00001 /**** 00002 ***** Copyright 2010 Intel Corporation All Rights Reserved. 00003 ***** 00004 ***** The source code, information and material contained herein are owned by Intel Corporation or its suppliers ***** 00005 ***** or licensors, and title to such Material remains with Intel Corporation or its suppliers or licensors. ***** 00006 ***** The Material contains proprietary information of Intel or its suppliers and licensors. The Material is ***** 00007 ***** protected by worldwide copyright laws and treaty provisions. No part of the Material may be used, copied, ***** 00008 ***** reproduced, modified, published, uploaded, posted, transmitted, distributed or disclosed in any way without ***** 00009 ***** Intel's prior express written permission. 00010 ***** 00011 ***** No license under any patent, copyright or other intellectual property rights in the material is granted to ***** 00012 ***** or conferred upon you, either expressly, by implication, inducement, estoppel or otherwise. Any license ***** 00013 ***** under such intellectual property rights must be express and approved by Intel in writing. 00014 ****/ 00015 00016 /**** Copyright Ends ****/ 00017 00018 // 00019 // This file was automatically generated and should not be edited directly. 00020 // 00021 00022 #ifndef ARBB_CPP_ELEMENTWISE_NESTED_SCALAR_HPP 00023 #define ARBB_CPP_ELEMENTWISE_NESTED_SCALAR_HPP 00024 00025 #include "namespace.hpp" 00026 #include <arbb_vmapi.h> 00027 #include "detail/error_details.hpp" 00028 #include "detail/enable_if.hpp" 00029 #include "detail/function.hpp" 00030 #include "detail/operators.hpp" 00031 #include "detail/scalar_traits.hpp" 00032 #include "nested.hpp" 00033 #include "scalar.hpp" 00034 00035 00036 00037 namespace ARBB_CPP_NS { 00038 00041 00049 template<arbb_scalar_type_t S> 00050 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> > >::type 00051 abs(const nested<scalar<S> >& value) 00052 { 00053 nested<scalar<S> > result; 00054 const arbb_variable_t outputs[] = {result.vm_variable()}; 00055 00056 const arbb_variable_t inputs[] = {value.vm_variable()}; 00057 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 00058 arbb_op(detail::function::current(), arbb_op_abs, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 00059 00060 return result; 00061 } 00062 00064 00067 00075 template<arbb_scalar_type_t S> 00076 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_fp< scalar<S> >::value, nested<scalar<S> > >::type 00077 acos(const nested<scalar<S> >& value) 00078 { 00079 nested<scalar<S> > result; 00080 const arbb_variable_t outputs[] = {result.vm_variable()}; 00081 00082 const arbb_variable_t inputs[] = {value.vm_variable()}; 00083 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 00084 arbb_op(detail::function::current(), arbb_op_acos, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 00085 00086 return result; 00087 } 00088 00090 00093 00101 template<arbb_scalar_type_t S> 00102 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_fp< scalar<S> >::value, nested<scalar<S> > >::type 00103 asin(const nested<scalar<S> >& value) 00104 { 00105 nested<scalar<S> > result; 00106 const arbb_variable_t outputs[] = {result.vm_variable()}; 00107 00108 const arbb_variable_t inputs[] = {value.vm_variable()}; 00109 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 00110 arbb_op(detail::function::current(), arbb_op_asin, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 00111 00112 return result; 00113 } 00114 00116 00119 00127 template<arbb_scalar_type_t S> 00128 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_fp< scalar<S> >::value, nested<scalar<S> > >::type 00129 atan(const nested<scalar<S> >& value) 00130 { 00131 nested<scalar<S> > result; 00132 const arbb_variable_t outputs[] = {result.vm_variable()}; 00133 00134 const arbb_variable_t inputs[] = {value.vm_variable()}; 00135 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 00136 arbb_op(detail::function::current(), arbb_op_atan, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 00137 00138 return result; 00139 } 00140 00142 00145 00161 template<arbb_scalar_type_t S> 00162 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> > >::type 00163 clamp(const typename uncaptured<scalar<S> >::type& value, const nested<scalar<S> >& minimum, const nested<scalar<S> >& maximum) 00164 { 00165 const scalar<S> captured_value = value; 00166 nested<scalar<S> > result; 00167 detail::clamp(result, captured_value, minimum, maximum); 00168 00169 return result; 00170 } 00171 00173 00176 00192 template<arbb_scalar_type_t S> 00193 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> > >::type 00194 clamp(const nested<scalar<S> >& value, const typename uncaptured<scalar<S> >::type& minimum, const nested<scalar<S> >& maximum) 00195 { 00196 const scalar<S> captured_minimum = minimum; 00197 nested<scalar<S> > result; 00198 detail::clamp(result, value, captured_minimum, maximum); 00199 00200 return result; 00201 } 00202 00204 00207 00226 template<arbb_scalar_type_t S> 00227 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> > >::type 00228 clamp(const typename uncaptured<scalar<S> >::type& value, const typename uncaptured<scalar<S> >::type& minimum, const nested<scalar<S> >& maximum) 00229 { 00230 const scalar<S> captured_value = value; 00231 const scalar<S> captured_minimum = minimum; 00232 nested<scalar<S> > result; 00233 detail::clamp(result, captured_value, captured_minimum, maximum); 00234 00235 return result; 00236 } 00237 00239 00242 00255 template<arbb_scalar_type_t S> 00256 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> > >::type 00257 clamp(const nested<scalar<S> >& value, const nested<scalar<S> >& minimum, const typename uncaptured<scalar<S> >::type& maximum) 00258 { 00259 const scalar<S> captured_maximum = maximum; 00260 nested<scalar<S> > result; 00261 detail::clamp(result, value, minimum, captured_maximum); 00262 00263 return result; 00264 } 00265 00267 00270 00286 template<arbb_scalar_type_t S> 00287 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> > >::type 00288 clamp(const typename uncaptured<scalar<S> >::type& value, const nested<scalar<S> >& minimum, const typename uncaptured<scalar<S> >::type& maximum) 00289 { 00290 const scalar<S> captured_value = value; 00291 const scalar<S> captured_maximum = maximum; 00292 nested<scalar<S> > result; 00293 detail::clamp(result, captured_value, minimum, captured_maximum); 00294 00295 return result; 00296 } 00297 00299 00302 00318 template<arbb_scalar_type_t S> 00319 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> > >::type 00320 clamp(const nested<scalar<S> >& value, const typename uncaptured<scalar<S> >::type& minimum, const typename uncaptured<scalar<S> >::type& maximum) 00321 { 00322 const scalar<S> captured_minimum = minimum; 00323 const scalar<S> captured_maximum = maximum; 00324 nested<scalar<S> > result; 00325 detail::clamp(result, value, captured_minimum, captured_maximum); 00326 00327 return result; 00328 } 00329 00331 00334 00344 template<arbb_scalar_type_t S> 00345 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> > >::type 00346 clamp(const nested<scalar<S> >& value, const nested<scalar<S> >& minimum, const nested<scalar<S> >& maximum) 00347 { 00348 nested<scalar<S> > result; 00349 detail::clamp(result, value, minimum, maximum); 00350 00351 return result; 00352 } 00353 00355 00358 00374 template<arbb_scalar_type_t S> 00375 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> > >::type 00376 clamp(const scalar<S>& value, const nested<scalar<S> >& minimum, const nested<scalar<S> >& maximum) 00377 { 00378 nested<scalar<S> > result; 00379 detail::clamp(result, value, minimum, maximum); 00380 00381 return result; 00382 } 00383 00385 00388 00404 template<arbb_scalar_type_t S> 00405 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> > >::type 00406 clamp(const nested<scalar<S> >& value, const scalar<S>& minimum, const nested<scalar<S> >& maximum) 00407 { 00408 nested<scalar<S> > result; 00409 detail::clamp(result, value, minimum, maximum); 00410 00411 return result; 00412 } 00413 00415 00418 00437 template<arbb_scalar_type_t S> 00438 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> > >::type 00439 clamp(const scalar<S>& value, const scalar<S>& minimum, const nested<scalar<S> >& maximum) 00440 { 00441 nested<scalar<S> > result; 00442 detail::clamp(result, value, minimum, maximum); 00443 00444 return result; 00445 } 00446 00448 00451 00464 template<arbb_scalar_type_t S> 00465 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> > >::type 00466 clamp(const nested<scalar<S> >& value, const nested<scalar<S> >& minimum, const scalar<S>& maximum) 00467 { 00468 nested<scalar<S> > result; 00469 detail::clamp(result, value, minimum, maximum); 00470 00471 return result; 00472 } 00473 00475 00478 00494 template<arbb_scalar_type_t S> 00495 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> > >::type 00496 clamp(const scalar<S>& value, const nested<scalar<S> >& minimum, const scalar<S>& maximum) 00497 { 00498 nested<scalar<S> > result; 00499 detail::clamp(result, value, minimum, maximum); 00500 00501 return result; 00502 } 00503 00505 00508 00524 template<arbb_scalar_type_t S> 00525 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> > >::type 00526 clamp(const nested<scalar<S> >& value, const scalar<S>& minimum, const scalar<S>& maximum) 00527 { 00528 nested<scalar<S> > result; 00529 detail::clamp(result, value, minimum, maximum); 00530 00531 return result; 00532 } 00533 00535 00538 00546 template<arbb_scalar_type_t S> 00547 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_fp< scalar<S> >::value, nested<scalar<S> > >::type 00548 cos(const nested<scalar<S> >& value) 00549 { 00550 nested<scalar<S> > result; 00551 const arbb_variable_t outputs[] = {result.vm_variable()}; 00552 00553 const arbb_variable_t inputs[] = {value.vm_variable()}; 00554 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 00555 arbb_op(detail::function::current(), arbb_op_cos, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 00556 00557 return result; 00558 } 00559 00561 00564 00572 template<arbb_scalar_type_t S> 00573 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_fp< scalar<S> >::value, nested<scalar<S> > >::type 00574 cosh(const nested<scalar<S> >& value) 00575 { 00576 nested<scalar<S> > result; 00577 const arbb_variable_t outputs[] = {result.vm_variable()}; 00578 00579 const arbb_variable_t inputs[] = {value.vm_variable()}; 00580 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 00581 arbb_op(detail::function::current(), arbb_op_cosh, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 00582 00583 return result; 00584 } 00585 00587 00590 00598 template<arbb_scalar_type_t S> 00599 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_fp< scalar<S> >::value, nested<scalar<S> > >::type 00600 exp(const nested<scalar<S> >& value) 00601 { 00602 nested<scalar<S> > result; 00603 const arbb_variable_t outputs[] = {result.vm_variable()}; 00604 00605 const arbb_variable_t inputs[] = {value.vm_variable()}; 00606 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 00607 arbb_op(detail::function::current(), arbb_op_exp, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 00608 00609 return result; 00610 } 00611 00613 00616 00624 template<arbb_scalar_type_t S> 00625 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_fp< scalar<S> >::value, nested<scalar<S> > >::type 00626 exp10(const nested<scalar<S> >& value) 00627 { 00628 nested<scalar<S> > result; 00629 const arbb_variable_t outputs[] = {result.vm_variable()}; 00630 00631 const arbb_variable_t inputs[] = {value.vm_variable()}; 00632 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 00633 arbb_op(detail::function::current(), arbb_op_exp10, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 00634 00635 return result; 00636 } 00637 00639 00642 00650 template<arbb_scalar_type_t S> 00651 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_fp< scalar<S> >::value, nested<scalar<S> > >::type 00652 floor(const nested<scalar<S> >& value) 00653 { 00654 nested<scalar<S> > result; 00655 const arbb_variable_t outputs[] = {result.vm_variable()}; 00656 00657 const arbb_variable_t inputs[] = {value.vm_variable()}; 00658 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 00659 arbb_op(detail::function::current(), arbb_op_floor, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 00660 00661 return result; 00662 } 00663 00665 00668 00676 template<arbb_scalar_type_t S> 00677 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_fp< scalar<S> >::value, nested<scalar<S> > >::type 00678 ceil(const nested<scalar<S> >& value) 00679 { 00680 nested<scalar<S> > result; 00681 const arbb_variable_t outputs[] = {result.vm_variable()}; 00682 00683 const arbb_variable_t inputs[] = {value.vm_variable()}; 00684 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 00685 arbb_op(detail::function::current(), arbb_op_ceil, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 00686 00687 return result; 00688 } 00689 00691 00694 00702 template<arbb_scalar_type_t S> 00703 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_fp< scalar<S> >::value, nested<scalar<S> > >::type 00704 log(const nested<scalar<S> >& value) 00705 { 00706 nested<scalar<S> > result; 00707 const arbb_variable_t outputs[] = {result.vm_variable()}; 00708 00709 const arbb_variable_t inputs[] = {value.vm_variable()}; 00710 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 00711 arbb_op(detail::function::current(), arbb_op_ln, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 00712 00713 return result; 00714 } 00715 00717 00720 00728 template<arbb_scalar_type_t S> 00729 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_fp< scalar<S> >::value, nested<scalar<S> > >::type 00730 log10(const nested<scalar<S> >& value) 00731 { 00732 nested<scalar<S> > result; 00733 const arbb_variable_t outputs[] = {result.vm_variable()}; 00734 00735 const arbb_variable_t inputs[] = {value.vm_variable()}; 00736 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 00737 arbb_op(detail::function::current(), arbb_op_log10, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 00738 00739 return result; 00740 } 00741 00743 00746 00754 template<arbb_scalar_type_t S> 00755 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_fp< scalar<S> >::value, nested<scalar<S> > >::type 00756 rcp(const nested<scalar<S> >& value) 00757 { 00758 nested<scalar<S> > result; 00759 const arbb_variable_t outputs[] = {result.vm_variable()}; 00760 00761 const arbb_variable_t inputs[] = {value.vm_variable()}; 00762 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 00763 arbb_op(detail::function::current(), arbb_op_rcp, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 00764 00765 return result; 00766 } 00767 00769 00772 00780 template<arbb_scalar_type_t S> 00781 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_fp< scalar<S> >::value, nested<scalar<S> > >::type 00782 round(const nested<scalar<S> >& value) 00783 { 00784 nested<scalar<S> > result; 00785 const arbb_variable_t outputs[] = {result.vm_variable()}; 00786 00787 const arbb_variable_t inputs[] = {value.vm_variable()}; 00788 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 00789 arbb_op(detail::function::current(), arbb_op_round, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 00790 00791 return result; 00792 } 00793 00795 00798 00806 template<arbb_scalar_type_t S> 00807 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_fp< scalar<S> >::value, nested<scalar<S> > >::type 00808 rsqrt(const nested<scalar<S> >& value) 00809 { 00810 nested<scalar<S> > result; 00811 const arbb_variable_t outputs[] = {result.vm_variable()}; 00812 00813 const arbb_variable_t inputs[] = {value.vm_variable()}; 00814 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 00815 arbb_op(detail::function::current(), arbb_op_rsqrt, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 00816 00817 return result; 00818 } 00819 00821 00824 00832 template<arbb_scalar_type_t S> 00833 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_fp< scalar<S> >::value, nested<scalar<S> > >::type 00834 sin(const nested<scalar<S> >& value) 00835 { 00836 nested<scalar<S> > result; 00837 const arbb_variable_t outputs[] = {result.vm_variable()}; 00838 00839 const arbb_variable_t inputs[] = {value.vm_variable()}; 00840 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 00841 arbb_op(detail::function::current(), arbb_op_sin, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 00842 00843 return result; 00844 } 00845 00847 00850 00858 template<arbb_scalar_type_t S> 00859 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_fp< scalar<S> >::value, nested<scalar<S> > >::type 00860 sinh(const nested<scalar<S> >& value) 00861 { 00862 nested<scalar<S> > result; 00863 const arbb_variable_t outputs[] = {result.vm_variable()}; 00864 00865 const arbb_variable_t inputs[] = {value.vm_variable()}; 00866 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 00867 arbb_op(detail::function::current(), arbb_op_sinh, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 00868 00869 return result; 00870 } 00871 00873 00876 00884 template<arbb_scalar_type_t S> 00885 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_fp< scalar<S> >::value, nested<scalar<S> > >::type 00886 sqrt(const nested<scalar<S> >& value) 00887 { 00888 nested<scalar<S> > result; 00889 const arbb_variable_t outputs[] = {result.vm_variable()}; 00890 00891 const arbb_variable_t inputs[] = {value.vm_variable()}; 00892 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 00893 arbb_op(detail::function::current(), arbb_op_sqrt, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 00894 00895 return result; 00896 } 00897 00899 00902 00910 template<arbb_scalar_type_t S> 00911 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_fp< scalar<S> >::value, nested<scalar<S> > >::type 00912 tan(const nested<scalar<S> >& value) 00913 { 00914 nested<scalar<S> > result; 00915 const arbb_variable_t outputs[] = {result.vm_variable()}; 00916 00917 const arbb_variable_t inputs[] = {value.vm_variable()}; 00918 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 00919 arbb_op(detail::function::current(), arbb_op_tan, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 00920 00921 return result; 00922 } 00923 00925 00928 00936 template<arbb_scalar_type_t S> 00937 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_fp< scalar<S> >::value, nested<scalar<S> > >::type 00938 tanh(const nested<scalar<S> >& value) 00939 { 00940 nested<scalar<S> > result; 00941 const arbb_variable_t outputs[] = {result.vm_variable()}; 00942 00943 const arbb_variable_t inputs[] = {value.vm_variable()}; 00944 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 00945 arbb_op(detail::function::current(), arbb_op_tanh, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 00946 00947 return result; 00948 } 00949 00951 00954 00961 inline 00962 nested<boolean > 00963 operator!(const nested<boolean >& value) 00964 { 00965 nested<boolean > result; 00966 const arbb_variable_t outputs[] = {result.vm_variable()}; 00967 00968 const arbb_variable_t inputs[] = {value.vm_variable()}; 00969 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 00970 arbb_op(detail::function::current(), arbb_op_log_not, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 00971 00972 return result; 00973 } 00974 00976 00979 00988 template<arbb_scalar_type_t S> 00989 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> > >::type 00990 operator~(const nested<scalar<S> >& value) 00991 { 00992 nested<scalar<S> > result; 00993 const arbb_variable_t outputs[] = {result.vm_variable()}; 00994 00995 const arbb_variable_t inputs[] = {value.vm_variable()}; 00996 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 00997 arbb_op(detail::function::current(), arbb_op_bit_not, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 00998 00999 return result; 01000 } 01001 01003 01006 01015 template<arbb_scalar_type_t S> 01016 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_signed< scalar<S> >::value, nested<scalar<S> > >::type 01017 operator-(const nested<scalar<S> >& value) 01018 { 01019 nested<scalar<S> > result; 01020 const arbb_variable_t outputs[] = {result.vm_variable()}; 01021 01022 const arbb_variable_t inputs[] = {value.vm_variable()}; 01023 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 01024 arbb_op(detail::function::current(), arbb_op_neg, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 01025 01026 return result; 01027 } 01028 01030 01033 01048 template<arbb_scalar_type_t S> 01049 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> > >::type 01050 operator+(const typename uncaptured<scalar<S> >::type& a, const nested<scalar<S> >& b) 01051 { 01052 const scalar<S> captured_a = a; 01053 nested<scalar<S> > result; 01054 const arbb_variable_t outputs[] = {result.vm_variable()}; 01055 01056 const arbb_variable_t inputs[] = {captured_a.vm_variable(), b.vm_variable()}; 01057 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 01058 arbb_op(detail::function::current(), arbb_op_add, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 01059 01060 return result; 01061 } 01062 01064 01067 01079 template<arbb_scalar_type_t S> 01080 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> > >::type 01081 operator+(const nested<scalar<S> >& a, const typename uncaptured<scalar<S> >::type& b) 01082 { 01083 const scalar<S> captured_b = b; 01084 nested<scalar<S> > result; 01085 const arbb_variable_t outputs[] = {result.vm_variable()}; 01086 01087 const arbb_variable_t inputs[] = {a.vm_variable(), captured_b.vm_variable()}; 01088 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 01089 arbb_op(detail::function::current(), arbb_op_add, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 01090 01091 return result; 01092 } 01093 01095 01098 01107 template<arbb_scalar_type_t S> 01108 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> > >::type 01109 operator+(const nested<scalar<S> >& a, const nested<scalar<S> >& b) 01110 { 01111 nested<scalar<S> > result; 01112 const arbb_variable_t outputs[] = {result.vm_variable()}; 01113 01114 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 01115 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 01116 arbb_op(detail::function::current(), arbb_op_add, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 01117 01118 return result; 01119 } 01120 01122 01125 01140 template<arbb_scalar_type_t S> 01141 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> > >::type 01142 operator+(const scalar<S>& a, const nested<scalar<S> >& b) 01143 { 01144 nested<scalar<S> > result; 01145 const arbb_variable_t outputs[] = {result.vm_variable()}; 01146 01147 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 01148 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 01149 arbb_op(detail::function::current(), arbb_op_add, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 01150 01151 return result; 01152 } 01153 01155 01158 01170 template<arbb_scalar_type_t S> 01171 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> > >::type 01172 operator+(const nested<scalar<S> >& a, const scalar<S>& b) 01173 { 01174 nested<scalar<S> > result; 01175 const arbb_variable_t outputs[] = {result.vm_variable()}; 01176 01177 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 01178 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 01179 arbb_op(detail::function::current(), arbb_op_add, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 01180 01181 return result; 01182 } 01183 01185 01188 01200 template<arbb_scalar_type_t S> 01201 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> >& >::type 01202 operator+=(nested<scalar<S> >& value, const typename uncaptured<scalar<S> >::type& increment) 01203 { 01204 const scalar<S> captured_increment = increment; 01205 const arbb_variable_t outputs[] = {value.vm_variable()}; 01206 01207 const arbb_variable_t inputs[] = {value.vm_variable(), captured_increment.vm_variable()}; 01208 void* debug_data_ptrs[] = {value.containers_begin()->get_debug_data_ptr()}; 01209 arbb_op(detail::function::current(), arbb_op_add, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 01210 01211 return value; 01212 } 01213 01215 01218 01227 template<arbb_scalar_type_t S> 01228 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> >& >::type 01229 operator+=(nested<scalar<S> >& value, const nested<scalar<S> >& increment) 01230 { 01231 const arbb_variable_t outputs[] = {value.vm_variable()}; 01232 01233 const arbb_variable_t inputs[] = {value.vm_variable(), increment.vm_variable()}; 01234 void* debug_data_ptrs[] = {value.containers_begin()->get_debug_data_ptr()}; 01235 arbb_op(detail::function::current(), arbb_op_add, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 01236 01237 return value; 01238 } 01239 01241 01244 01256 template<arbb_scalar_type_t S> 01257 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> >& >::type 01258 operator+=(nested<scalar<S> >& value, const scalar<S>& increment) 01259 { 01260 const arbb_variable_t outputs[] = {value.vm_variable()}; 01261 01262 const arbb_variable_t inputs[] = {value.vm_variable(), increment.vm_variable()}; 01263 void* debug_data_ptrs[] = {value.containers_begin()->get_debug_data_ptr()}; 01264 arbb_op(detail::function::current(), arbb_op_add, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 01265 01266 return value; 01267 } 01268 01270 01273 01289 template<arbb_scalar_type_t S> 01290 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> > >::type 01291 operator&(const typename uncaptured<scalar<S> >::type& value, const nested<scalar<S> >& mask) 01292 { 01293 const scalar<S> captured_value = value; 01294 nested<scalar<S> > result; 01295 const arbb_variable_t outputs[] = {result.vm_variable()}; 01296 01297 const arbb_variable_t inputs[] = {captured_value.vm_variable(), mask.vm_variable()}; 01298 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 01299 arbb_op(detail::function::current(), arbb_op_bit_and, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 01300 01301 return result; 01302 } 01303 01305 01308 01321 template<arbb_scalar_type_t S> 01322 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> > >::type 01323 operator&(const nested<scalar<S> >& value, const typename uncaptured<scalar<S> >::type& mask) 01324 { 01325 const scalar<S> captured_mask = mask; 01326 nested<scalar<S> > result; 01327 const arbb_variable_t outputs[] = {result.vm_variable()}; 01328 01329 const arbb_variable_t inputs[] = {value.vm_variable(), captured_mask.vm_variable()}; 01330 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 01331 arbb_op(detail::function::current(), arbb_op_bit_and, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 01332 01333 return result; 01334 } 01335 01337 01340 01350 template<arbb_scalar_type_t S> 01351 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> > >::type 01352 operator&(const nested<scalar<S> >& value, const nested<scalar<S> >& mask) 01353 { 01354 nested<scalar<S> > result; 01355 const arbb_variable_t outputs[] = {result.vm_variable()}; 01356 01357 const arbb_variable_t inputs[] = {value.vm_variable(), mask.vm_variable()}; 01358 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 01359 arbb_op(detail::function::current(), arbb_op_bit_and, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 01360 01361 return result; 01362 } 01363 01365 01368 01384 template<arbb_scalar_type_t S> 01385 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> > >::type 01386 operator&(const scalar<S>& value, const nested<scalar<S> >& mask) 01387 { 01388 nested<scalar<S> > result; 01389 const arbb_variable_t outputs[] = {result.vm_variable()}; 01390 01391 const arbb_variable_t inputs[] = {value.vm_variable(), mask.vm_variable()}; 01392 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 01393 arbb_op(detail::function::current(), arbb_op_bit_and, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 01394 01395 return result; 01396 } 01397 01399 01402 01415 template<arbb_scalar_type_t S> 01416 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> > >::type 01417 operator&(const nested<scalar<S> >& value, const scalar<S>& mask) 01418 { 01419 nested<scalar<S> > result; 01420 const arbb_variable_t outputs[] = {result.vm_variable()}; 01421 01422 const arbb_variable_t inputs[] = {value.vm_variable(), mask.vm_variable()}; 01423 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 01424 arbb_op(detail::function::current(), arbb_op_bit_and, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 01425 01426 return result; 01427 } 01428 01430 01433 01446 template<arbb_scalar_type_t S> 01447 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> >& >::type 01448 operator&=(nested<scalar<S> >& value, const typename uncaptured<scalar<S> >::type& mask) 01449 { 01450 const scalar<S> captured_mask = mask; 01451 const arbb_variable_t outputs[] = {value.vm_variable()}; 01452 01453 const arbb_variable_t inputs[] = {value.vm_variable(), captured_mask.vm_variable()}; 01454 void* debug_data_ptrs[] = {value.containers_begin()->get_debug_data_ptr()}; 01455 arbb_op(detail::function::current(), arbb_op_bit_and, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 01456 01457 return value; 01458 } 01459 01461 01464 01474 template<arbb_scalar_type_t S> 01475 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> >& >::type 01476 operator&=(nested<scalar<S> >& value, const nested<scalar<S> >& mask) 01477 { 01478 const arbb_variable_t outputs[] = {value.vm_variable()}; 01479 01480 const arbb_variable_t inputs[] = {value.vm_variable(), mask.vm_variable()}; 01481 void* debug_data_ptrs[] = {value.containers_begin()->get_debug_data_ptr()}; 01482 arbb_op(detail::function::current(), arbb_op_bit_and, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 01483 01484 return value; 01485 } 01486 01488 01491 01504 template<arbb_scalar_type_t S> 01505 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> >& >::type 01506 operator&=(nested<scalar<S> >& value, const scalar<S>& mask) 01507 { 01508 const arbb_variable_t outputs[] = {value.vm_variable()}; 01509 01510 const arbb_variable_t inputs[] = {value.vm_variable(), mask.vm_variable()}; 01511 void* debug_data_ptrs[] = {value.containers_begin()->get_debug_data_ptr()}; 01512 arbb_op(detail::function::current(), arbb_op_bit_and, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 01513 01514 return value; 01515 } 01516 01518 01521 01536 template<arbb_scalar_type_t S> 01537 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_fp< scalar<S> >::value, nested<scalar<S> > >::type 01538 atan2(const typename uncaptured<scalar<S> >::type& x, const nested<scalar<S> >& y) 01539 { 01540 const scalar<S> captured_x = x; 01541 nested<scalar<S> > result; 01542 const arbb_variable_t outputs[] = {result.vm_variable()}; 01543 01544 const arbb_variable_t inputs[] = {captured_x.vm_variable(), y.vm_variable()}; 01545 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 01546 arbb_op(detail::function::current(), arbb_op_atan2, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 01547 01548 return result; 01549 } 01550 01552 01555 01567 template<arbb_scalar_type_t S> 01568 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_fp< scalar<S> >::value, nested<scalar<S> > >::type 01569 atan2(const nested<scalar<S> >& x, const typename uncaptured<scalar<S> >::type& y) 01570 { 01571 const scalar<S> captured_y = y; 01572 nested<scalar<S> > result; 01573 const arbb_variable_t outputs[] = {result.vm_variable()}; 01574 01575 const arbb_variable_t inputs[] = {x.vm_variable(), captured_y.vm_variable()}; 01576 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 01577 arbb_op(detail::function::current(), arbb_op_atan2, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 01578 01579 return result; 01580 } 01581 01583 01586 01595 template<arbb_scalar_type_t S> 01596 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_fp< scalar<S> >::value, nested<scalar<S> > >::type 01597 atan2(const nested<scalar<S> >& x, const nested<scalar<S> >& y) 01598 { 01599 nested<scalar<S> > result; 01600 const arbb_variable_t outputs[] = {result.vm_variable()}; 01601 01602 const arbb_variable_t inputs[] = {x.vm_variable(), y.vm_variable()}; 01603 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 01604 arbb_op(detail::function::current(), arbb_op_atan2, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 01605 01606 return result; 01607 } 01608 01610 01613 01628 template<arbb_scalar_type_t S> 01629 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_fp< scalar<S> >::value, nested<scalar<S> > >::type 01630 atan2(const scalar<S>& x, const nested<scalar<S> >& y) 01631 { 01632 nested<scalar<S> > result; 01633 const arbb_variable_t outputs[] = {result.vm_variable()}; 01634 01635 const arbb_variable_t inputs[] = {x.vm_variable(), y.vm_variable()}; 01636 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 01637 arbb_op(detail::function::current(), arbb_op_atan2, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 01638 01639 return result; 01640 } 01641 01643 01646 01658 template<arbb_scalar_type_t S> 01659 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_fp< scalar<S> >::value, nested<scalar<S> > >::type 01660 atan2(const nested<scalar<S> >& x, const scalar<S>& y) 01661 { 01662 nested<scalar<S> > result; 01663 const arbb_variable_t outputs[] = {result.vm_variable()}; 01664 01665 const arbb_variable_t inputs[] = {x.vm_variable(), y.vm_variable()}; 01666 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 01667 arbb_op(detail::function::current(), arbb_op_atan2, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 01668 01669 return result; 01670 } 01671 01673 01676 01690 template<arbb_scalar_type_t S> 01691 nested<isize > 01692 compare(const typename uncaptured<scalar<S> >::type& a, const nested<scalar<S> >& b) 01693 { 01694 const scalar<S> captured_a = a; 01695 nested<isize > result; 01696 const arbb_variable_t outputs[] = {result.vm_variable()}; 01697 01698 const arbb_variable_t inputs[] = {captured_a.vm_variable(), b.vm_variable()}; 01699 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 01700 arbb_op(detail::function::current(), arbb_op_compare, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 01701 01702 return result; 01703 } 01704 01706 01709 01720 template<arbb_scalar_type_t S> 01721 nested<isize > 01722 compare(const nested<scalar<S> >& a, const typename uncaptured<scalar<S> >::type& b) 01723 { 01724 const scalar<S> captured_b = b; 01725 nested<isize > result; 01726 const arbb_variable_t outputs[] = {result.vm_variable()}; 01727 01728 const arbb_variable_t inputs[] = {a.vm_variable(), captured_b.vm_variable()}; 01729 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 01730 arbb_op(detail::function::current(), arbb_op_compare, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 01731 01732 return result; 01733 } 01734 01736 01739 01747 template<arbb_scalar_type_t S> 01748 nested<isize > 01749 compare(const nested<scalar<S> >& a, const nested<scalar<S> >& b) 01750 { 01751 nested<isize > result; 01752 const arbb_variable_t outputs[] = {result.vm_variable()}; 01753 01754 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 01755 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 01756 arbb_op(detail::function::current(), arbb_op_compare, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 01757 01758 return result; 01759 } 01760 01762 01765 01779 template<arbb_scalar_type_t S> 01780 nested<isize > 01781 compare(const scalar<S>& a, const nested<scalar<S> >& b) 01782 { 01783 nested<isize > result; 01784 const arbb_variable_t outputs[] = {result.vm_variable()}; 01785 01786 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 01787 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 01788 arbb_op(detail::function::current(), arbb_op_compare, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 01789 01790 return result; 01791 } 01792 01794 01797 01808 template<arbb_scalar_type_t S> 01809 nested<isize > 01810 compare(const nested<scalar<S> >& a, const scalar<S>& b) 01811 { 01812 nested<isize > result; 01813 const arbb_variable_t outputs[] = {result.vm_variable()}; 01814 01815 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 01816 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 01817 arbb_op(detail::function::current(), arbb_op_compare, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 01818 01819 return result; 01820 } 01821 01823 01826 01841 template<arbb_scalar_type_t S> 01842 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> > >::type 01843 operator/(const typename uncaptured<scalar<S> >::type& numerator, const nested<scalar<S> >& denominator) 01844 { 01845 const scalar<S> captured_numerator = numerator; 01846 nested<scalar<S> > result; 01847 const arbb_variable_t outputs[] = {result.vm_variable()}; 01848 01849 const arbb_variable_t inputs[] = {captured_numerator.vm_variable(), denominator.vm_variable()}; 01850 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 01851 arbb_op(detail::function::current(), arbb_op_div, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 01852 01853 return result; 01854 } 01855 01857 01860 01872 template<arbb_scalar_type_t S> 01873 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> > >::type 01874 operator/(const nested<scalar<S> >& numerator, const typename uncaptured<scalar<S> >::type& denominator) 01875 { 01876 const scalar<S> captured_denominator = denominator; 01877 nested<scalar<S> > result; 01878 const arbb_variable_t outputs[] = {result.vm_variable()}; 01879 01880 const arbb_variable_t inputs[] = {numerator.vm_variable(), captured_denominator.vm_variable()}; 01881 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 01882 arbb_op(detail::function::current(), arbb_op_div, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 01883 01884 return result; 01885 } 01886 01888 01891 01900 template<arbb_scalar_type_t S> 01901 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> > >::type 01902 operator/(const nested<scalar<S> >& numerator, const nested<scalar<S> >& denominator) 01903 { 01904 nested<scalar<S> > result; 01905 const arbb_variable_t outputs[] = {result.vm_variable()}; 01906 01907 const arbb_variable_t inputs[] = {numerator.vm_variable(), denominator.vm_variable()}; 01908 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 01909 arbb_op(detail::function::current(), arbb_op_div, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 01910 01911 return result; 01912 } 01913 01915 01918 01933 template<arbb_scalar_type_t S> 01934 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> > >::type 01935 operator/(const scalar<S>& numerator, const nested<scalar<S> >& denominator) 01936 { 01937 nested<scalar<S> > result; 01938 const arbb_variable_t outputs[] = {result.vm_variable()}; 01939 01940 const arbb_variable_t inputs[] = {numerator.vm_variable(), denominator.vm_variable()}; 01941 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 01942 arbb_op(detail::function::current(), arbb_op_div, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 01943 01944 return result; 01945 } 01946 01948 01951 01963 template<arbb_scalar_type_t S> 01964 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> > >::type 01965 operator/(const nested<scalar<S> >& numerator, const scalar<S>& denominator) 01966 { 01967 nested<scalar<S> > result; 01968 const arbb_variable_t outputs[] = {result.vm_variable()}; 01969 01970 const arbb_variable_t inputs[] = {numerator.vm_variable(), denominator.vm_variable()}; 01971 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 01972 arbb_op(detail::function::current(), arbb_op_div, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 01973 01974 return result; 01975 } 01976 01978 01981 01993 template<arbb_scalar_type_t S> 01994 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> >& >::type 01995 operator/=(nested<scalar<S> >& value, const typename uncaptured<scalar<S> >::type& denominator) 01996 { 01997 const scalar<S> captured_denominator = denominator; 01998 const arbb_variable_t outputs[] = {value.vm_variable()}; 01999 02000 const arbb_variable_t inputs[] = {value.vm_variable(), captured_denominator.vm_variable()}; 02001 void* debug_data_ptrs[] = {value.containers_begin()->get_debug_data_ptr()}; 02002 arbb_op(detail::function::current(), arbb_op_div, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 02003 02004 return value; 02005 } 02006 02008 02011 02020 template<arbb_scalar_type_t S> 02021 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> >& >::type 02022 operator/=(nested<scalar<S> >& value, const nested<scalar<S> >& denominator) 02023 { 02024 const arbb_variable_t outputs[] = {value.vm_variable()}; 02025 02026 const arbb_variable_t inputs[] = {value.vm_variable(), denominator.vm_variable()}; 02027 void* debug_data_ptrs[] = {value.containers_begin()->get_debug_data_ptr()}; 02028 arbb_op(detail::function::current(), arbb_op_div, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 02029 02030 return value; 02031 } 02032 02034 02037 02049 template<arbb_scalar_type_t S> 02050 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> >& >::type 02051 operator/=(nested<scalar<S> >& value, const scalar<S>& denominator) 02052 { 02053 const arbb_variable_t outputs[] = {value.vm_variable()}; 02054 02055 const arbb_variable_t inputs[] = {value.vm_variable(), denominator.vm_variable()}; 02056 void* debug_data_ptrs[] = {value.containers_begin()->get_debug_data_ptr()}; 02057 arbb_op(detail::function::current(), arbb_op_div, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 02058 02059 return value; 02060 } 02061 02063 02066 02081 template<arbb_scalar_type_t S> 02082 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_fp< scalar<S> >::value, nested<scalar<S> > >::type 02083 div_tan(const typename uncaptured<scalar<S> >::type& x, const nested<scalar<S> >& y) 02084 { 02085 const scalar<S> captured_x = x; 02086 nested<scalar<S> > result; 02087 const arbb_variable_t outputs[] = {result.vm_variable()}; 02088 02089 const arbb_variable_t inputs[] = {captured_x.vm_variable(), y.vm_variable()}; 02090 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 02091 arbb_op(detail::function::current(), arbb_op_div_tan, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 02092 02093 return result; 02094 } 02095 02097 02100 02112 template<arbb_scalar_type_t S> 02113 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_fp< scalar<S> >::value, nested<scalar<S> > >::type 02114 div_tan(const nested<scalar<S> >& x, const typename uncaptured<scalar<S> >::type& y) 02115 { 02116 const scalar<S> captured_y = y; 02117 nested<scalar<S> > result; 02118 const arbb_variable_t outputs[] = {result.vm_variable()}; 02119 02120 const arbb_variable_t inputs[] = {x.vm_variable(), captured_y.vm_variable()}; 02121 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 02122 arbb_op(detail::function::current(), arbb_op_div_tan, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 02123 02124 return result; 02125 } 02126 02128 02131 02140 template<arbb_scalar_type_t S> 02141 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_fp< scalar<S> >::value, nested<scalar<S> > >::type 02142 div_tan(const nested<scalar<S> >& x, const nested<scalar<S> >& y) 02143 { 02144 nested<scalar<S> > result; 02145 const arbb_variable_t outputs[] = {result.vm_variable()}; 02146 02147 const arbb_variable_t inputs[] = {x.vm_variable(), y.vm_variable()}; 02148 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 02149 arbb_op(detail::function::current(), arbb_op_div_tan, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 02150 02151 return result; 02152 } 02153 02155 02158 02173 template<arbb_scalar_type_t S> 02174 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_fp< scalar<S> >::value, nested<scalar<S> > >::type 02175 div_tan(const scalar<S>& x, const nested<scalar<S> >& y) 02176 { 02177 nested<scalar<S> > result; 02178 const arbb_variable_t outputs[] = {result.vm_variable()}; 02179 02180 const arbb_variable_t inputs[] = {x.vm_variable(), y.vm_variable()}; 02181 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 02182 arbb_op(detail::function::current(), arbb_op_div_tan, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 02183 02184 return result; 02185 } 02186 02188 02191 02203 template<arbb_scalar_type_t S> 02204 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_fp< scalar<S> >::value, nested<scalar<S> > >::type 02205 div_tan(const nested<scalar<S> >& x, const scalar<S>& y) 02206 { 02207 nested<scalar<S> > result; 02208 const arbb_variable_t outputs[] = {result.vm_variable()}; 02209 02210 const arbb_variable_t inputs[] = {x.vm_variable(), y.vm_variable()}; 02211 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 02212 arbb_op(detail::function::current(), arbb_op_div_tan, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 02213 02214 return result; 02215 } 02216 02218 02221 02235 template<arbb_scalar_type_t S> 02236 nested<boolean > 02237 operator==(const typename uncaptured<scalar<S> >::type& a, const nested<scalar<S> >& b) 02238 { 02239 const scalar<S> captured_a = a; 02240 nested<boolean > result; 02241 const arbb_variable_t outputs[] = {result.vm_variable()}; 02242 02243 const arbb_variable_t inputs[] = {captured_a.vm_variable(), b.vm_variable()}; 02244 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 02245 arbb_op(detail::function::current(), arbb_op_equal, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 02246 02247 return result; 02248 } 02249 02251 02254 02265 template<arbb_scalar_type_t S> 02266 nested<boolean > 02267 operator==(const nested<scalar<S> >& a, const typename uncaptured<scalar<S> >::type& b) 02268 { 02269 const scalar<S> captured_b = b; 02270 nested<boolean > result; 02271 const arbb_variable_t outputs[] = {result.vm_variable()}; 02272 02273 const arbb_variable_t inputs[] = {a.vm_variable(), captured_b.vm_variable()}; 02274 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 02275 arbb_op(detail::function::current(), arbb_op_equal, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 02276 02277 return result; 02278 } 02279 02281 02284 02292 template<arbb_scalar_type_t S> 02293 nested<boolean > 02294 operator==(const nested<scalar<S> >& a, const nested<scalar<S> >& b) 02295 { 02296 nested<boolean > result; 02297 const arbb_variable_t outputs[] = {result.vm_variable()}; 02298 02299 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 02300 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 02301 arbb_op(detail::function::current(), arbb_op_equal, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 02302 02303 return result; 02304 } 02305 02307 02310 02324 template<arbb_scalar_type_t S> 02325 nested<boolean > 02326 operator==(const scalar<S>& a, const nested<scalar<S> >& b) 02327 { 02328 nested<boolean > result; 02329 const arbb_variable_t outputs[] = {result.vm_variable()}; 02330 02331 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 02332 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 02333 arbb_op(detail::function::current(), arbb_op_equal, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 02334 02335 return result; 02336 } 02337 02339 02342 02353 template<arbb_scalar_type_t S> 02354 nested<boolean > 02355 operator==(const nested<scalar<S> >& a, const scalar<S>& b) 02356 { 02357 nested<boolean > result; 02358 const arbb_variable_t outputs[] = {result.vm_variable()}; 02359 02360 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 02361 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 02362 arbb_op(detail::function::current(), arbb_op_equal, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 02363 02364 return result; 02365 } 02366 02368 02371 02385 template<arbb_scalar_type_t S> 02386 nested<boolean > 02387 operator>=(const typename uncaptured<scalar<S> >::type& a, const nested<scalar<S> >& b) 02388 { 02389 const scalar<S> captured_a = a; 02390 nested<boolean > result; 02391 const arbb_variable_t outputs[] = {result.vm_variable()}; 02392 02393 const arbb_variable_t inputs[] = {captured_a.vm_variable(), b.vm_variable()}; 02394 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 02395 arbb_op(detail::function::current(), arbb_op_geq, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 02396 02397 return result; 02398 } 02399 02401 02404 02415 template<arbb_scalar_type_t S> 02416 nested<boolean > 02417 operator>=(const nested<scalar<S> >& a, const typename uncaptured<scalar<S> >::type& b) 02418 { 02419 const scalar<S> captured_b = b; 02420 nested<boolean > result; 02421 const arbb_variable_t outputs[] = {result.vm_variable()}; 02422 02423 const arbb_variable_t inputs[] = {a.vm_variable(), captured_b.vm_variable()}; 02424 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 02425 arbb_op(detail::function::current(), arbb_op_geq, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 02426 02427 return result; 02428 } 02429 02431 02434 02442 template<arbb_scalar_type_t S> 02443 nested<boolean > 02444 operator>=(const nested<scalar<S> >& a, const nested<scalar<S> >& b) 02445 { 02446 nested<boolean > result; 02447 const arbb_variable_t outputs[] = {result.vm_variable()}; 02448 02449 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 02450 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 02451 arbb_op(detail::function::current(), arbb_op_geq, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 02452 02453 return result; 02454 } 02455 02457 02460 02474 template<arbb_scalar_type_t S> 02475 nested<boolean > 02476 operator>=(const scalar<S>& a, const nested<scalar<S> >& b) 02477 { 02478 nested<boolean > result; 02479 const arbb_variable_t outputs[] = {result.vm_variable()}; 02480 02481 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 02482 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 02483 arbb_op(detail::function::current(), arbb_op_geq, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 02484 02485 return result; 02486 } 02487 02489 02492 02503 template<arbb_scalar_type_t S> 02504 nested<boolean > 02505 operator>=(const nested<scalar<S> >& a, const scalar<S>& b) 02506 { 02507 nested<boolean > result; 02508 const arbb_variable_t outputs[] = {result.vm_variable()}; 02509 02510 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 02511 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 02512 arbb_op(detail::function::current(), arbb_op_geq, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 02513 02514 return result; 02515 } 02516 02518 02521 02535 template<arbb_scalar_type_t S> 02536 nested<boolean > 02537 operator>(const typename uncaptured<scalar<S> >::type& a, const nested<scalar<S> >& b) 02538 { 02539 const scalar<S> captured_a = a; 02540 nested<boolean > result; 02541 const arbb_variable_t outputs[] = {result.vm_variable()}; 02542 02543 const arbb_variable_t inputs[] = {captured_a.vm_variable(), b.vm_variable()}; 02544 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 02545 arbb_op(detail::function::current(), arbb_op_greater, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 02546 02547 return result; 02548 } 02549 02551 02554 02565 template<arbb_scalar_type_t S> 02566 nested<boolean > 02567 operator>(const nested<scalar<S> >& a, const typename uncaptured<scalar<S> >::type& b) 02568 { 02569 const scalar<S> captured_b = b; 02570 nested<boolean > result; 02571 const arbb_variable_t outputs[] = {result.vm_variable()}; 02572 02573 const arbb_variable_t inputs[] = {a.vm_variable(), captured_b.vm_variable()}; 02574 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 02575 arbb_op(detail::function::current(), arbb_op_greater, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 02576 02577 return result; 02578 } 02579 02581 02584 02592 template<arbb_scalar_type_t S> 02593 nested<boolean > 02594 operator>(const nested<scalar<S> >& a, const nested<scalar<S> >& b) 02595 { 02596 nested<boolean > result; 02597 const arbb_variable_t outputs[] = {result.vm_variable()}; 02598 02599 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 02600 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 02601 arbb_op(detail::function::current(), arbb_op_greater, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 02602 02603 return result; 02604 } 02605 02607 02610 02624 template<arbb_scalar_type_t S> 02625 nested<boolean > 02626 operator>(const scalar<S>& a, const nested<scalar<S> >& b) 02627 { 02628 nested<boolean > result; 02629 const arbb_variable_t outputs[] = {result.vm_variable()}; 02630 02631 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 02632 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 02633 arbb_op(detail::function::current(), arbb_op_greater, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 02634 02635 return result; 02636 } 02637 02639 02642 02653 template<arbb_scalar_type_t S> 02654 nested<boolean > 02655 operator>(const nested<scalar<S> >& a, const scalar<S>& b) 02656 { 02657 nested<boolean > result; 02658 const arbb_variable_t outputs[] = {result.vm_variable()}; 02659 02660 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 02661 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 02662 arbb_op(detail::function::current(), arbb_op_greater, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 02663 02664 return result; 02665 } 02666 02668 02671 02687 template<arbb_scalar_type_t S> 02688 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> > >::type 02689 operator|(const typename uncaptured<scalar<S> >::type& value, const nested<scalar<S> >& mask) 02690 { 02691 const scalar<S> captured_value = value; 02692 nested<scalar<S> > result; 02693 const arbb_variable_t outputs[] = {result.vm_variable()}; 02694 02695 const arbb_variable_t inputs[] = {captured_value.vm_variable(), mask.vm_variable()}; 02696 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 02697 arbb_op(detail::function::current(), arbb_op_bit_or, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 02698 02699 return result; 02700 } 02701 02703 02706 02719 template<arbb_scalar_type_t S> 02720 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> > >::type 02721 operator|(const nested<scalar<S> >& value, const typename uncaptured<scalar<S> >::type& mask) 02722 { 02723 const scalar<S> captured_mask = mask; 02724 nested<scalar<S> > result; 02725 const arbb_variable_t outputs[] = {result.vm_variable()}; 02726 02727 const arbb_variable_t inputs[] = {value.vm_variable(), captured_mask.vm_variable()}; 02728 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 02729 arbb_op(detail::function::current(), arbb_op_bit_or, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 02730 02731 return result; 02732 } 02733 02735 02738 02748 template<arbb_scalar_type_t S> 02749 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> > >::type 02750 operator|(const nested<scalar<S> >& value, const nested<scalar<S> >& mask) 02751 { 02752 nested<scalar<S> > result; 02753 const arbb_variable_t outputs[] = {result.vm_variable()}; 02754 02755 const arbb_variable_t inputs[] = {value.vm_variable(), mask.vm_variable()}; 02756 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 02757 arbb_op(detail::function::current(), arbb_op_bit_or, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 02758 02759 return result; 02760 } 02761 02763 02766 02782 template<arbb_scalar_type_t S> 02783 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> > >::type 02784 operator|(const scalar<S>& value, const nested<scalar<S> >& mask) 02785 { 02786 nested<scalar<S> > result; 02787 const arbb_variable_t outputs[] = {result.vm_variable()}; 02788 02789 const arbb_variable_t inputs[] = {value.vm_variable(), mask.vm_variable()}; 02790 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 02791 arbb_op(detail::function::current(), arbb_op_bit_or, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 02792 02793 return result; 02794 } 02795 02797 02800 02813 template<arbb_scalar_type_t S> 02814 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> > >::type 02815 operator|(const nested<scalar<S> >& value, const scalar<S>& mask) 02816 { 02817 nested<scalar<S> > result; 02818 const arbb_variable_t outputs[] = {result.vm_variable()}; 02819 02820 const arbb_variable_t inputs[] = {value.vm_variable(), mask.vm_variable()}; 02821 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 02822 arbb_op(detail::function::current(), arbb_op_bit_or, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 02823 02824 return result; 02825 } 02826 02828 02831 02844 template<arbb_scalar_type_t S> 02845 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> >& >::type 02846 operator|=(nested<scalar<S> >& value, const typename uncaptured<scalar<S> >::type& mask) 02847 { 02848 const scalar<S> captured_mask = mask; 02849 const arbb_variable_t outputs[] = {value.vm_variable()}; 02850 02851 const arbb_variable_t inputs[] = {value.vm_variable(), captured_mask.vm_variable()}; 02852 void* debug_data_ptrs[] = {value.containers_begin()->get_debug_data_ptr()}; 02853 arbb_op(detail::function::current(), arbb_op_bit_or, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 02854 02855 return value; 02856 } 02857 02859 02862 02872 template<arbb_scalar_type_t S> 02873 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> >& >::type 02874 operator|=(nested<scalar<S> >& value, const nested<scalar<S> >& mask) 02875 { 02876 const arbb_variable_t outputs[] = {value.vm_variable()}; 02877 02878 const arbb_variable_t inputs[] = {value.vm_variable(), mask.vm_variable()}; 02879 void* debug_data_ptrs[] = {value.containers_begin()->get_debug_data_ptr()}; 02880 arbb_op(detail::function::current(), arbb_op_bit_or, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 02881 02882 return value; 02883 } 02884 02886 02889 02902 template<arbb_scalar_type_t S> 02903 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> >& >::type 02904 operator|=(nested<scalar<S> >& value, const scalar<S>& mask) 02905 { 02906 const arbb_variable_t outputs[] = {value.vm_variable()}; 02907 02908 const arbb_variable_t inputs[] = {value.vm_variable(), mask.vm_variable()}; 02909 void* debug_data_ptrs[] = {value.containers_begin()->get_debug_data_ptr()}; 02910 arbb_op(detail::function::current(), arbb_op_bit_or, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 02911 02912 return value; 02913 } 02914 02916 02919 02933 template<arbb_scalar_type_t S> 02934 nested<boolean > 02935 operator<=(const typename uncaptured<scalar<S> >::type& a, const nested<scalar<S> >& b) 02936 { 02937 const scalar<S> captured_a = a; 02938 nested<boolean > result; 02939 const arbb_variable_t outputs[] = {result.vm_variable()}; 02940 02941 const arbb_variable_t inputs[] = {captured_a.vm_variable(), b.vm_variable()}; 02942 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 02943 arbb_op(detail::function::current(), arbb_op_leq, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 02944 02945 return result; 02946 } 02947 02949 02952 02963 template<arbb_scalar_type_t S> 02964 nested<boolean > 02965 operator<=(const nested<scalar<S> >& a, const typename uncaptured<scalar<S> >::type& b) 02966 { 02967 const scalar<S> captured_b = b; 02968 nested<boolean > result; 02969 const arbb_variable_t outputs[] = {result.vm_variable()}; 02970 02971 const arbb_variable_t inputs[] = {a.vm_variable(), captured_b.vm_variable()}; 02972 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 02973 arbb_op(detail::function::current(), arbb_op_leq, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 02974 02975 return result; 02976 } 02977 02979 02982 02990 template<arbb_scalar_type_t S> 02991 nested<boolean > 02992 operator<=(const nested<scalar<S> >& a, const nested<scalar<S> >& b) 02993 { 02994 nested<boolean > result; 02995 const arbb_variable_t outputs[] = {result.vm_variable()}; 02996 02997 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 02998 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 02999 arbb_op(detail::function::current(), arbb_op_leq, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 03000 03001 return result; 03002 } 03003 03005 03008 03022 template<arbb_scalar_type_t S> 03023 nested<boolean > 03024 operator<=(const scalar<S>& a, const nested<scalar<S> >& b) 03025 { 03026 nested<boolean > result; 03027 const arbb_variable_t outputs[] = {result.vm_variable()}; 03028 03029 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 03030 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 03031 arbb_op(detail::function::current(), arbb_op_leq, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 03032 03033 return result; 03034 } 03035 03037 03040 03051 template<arbb_scalar_type_t S> 03052 nested<boolean > 03053 operator<=(const nested<scalar<S> >& a, const scalar<S>& b) 03054 { 03055 nested<boolean > result; 03056 const arbb_variable_t outputs[] = {result.vm_variable()}; 03057 03058 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 03059 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 03060 arbb_op(detail::function::current(), arbb_op_leq, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 03061 03062 return result; 03063 } 03064 03066 03069 03083 template<arbb_scalar_type_t S> 03084 nested<boolean > 03085 operator<(const typename uncaptured<scalar<S> >::type& a, const nested<scalar<S> >& b) 03086 { 03087 const scalar<S> captured_a = a; 03088 nested<boolean > result; 03089 const arbb_variable_t outputs[] = {result.vm_variable()}; 03090 03091 const arbb_variable_t inputs[] = {captured_a.vm_variable(), b.vm_variable()}; 03092 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 03093 arbb_op(detail::function::current(), arbb_op_less, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 03094 03095 return result; 03096 } 03097 03099 03102 03113 template<arbb_scalar_type_t S> 03114 nested<boolean > 03115 operator<(const nested<scalar<S> >& a, const typename uncaptured<scalar<S> >::type& b) 03116 { 03117 const scalar<S> captured_b = b; 03118 nested<boolean > result; 03119 const arbb_variable_t outputs[] = {result.vm_variable()}; 03120 03121 const arbb_variable_t inputs[] = {a.vm_variable(), captured_b.vm_variable()}; 03122 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 03123 arbb_op(detail::function::current(), arbb_op_less, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 03124 03125 return result; 03126 } 03127 03129 03132 03140 template<arbb_scalar_type_t S> 03141 nested<boolean > 03142 operator<(const nested<scalar<S> >& a, const nested<scalar<S> >& b) 03143 { 03144 nested<boolean > result; 03145 const arbb_variable_t outputs[] = {result.vm_variable()}; 03146 03147 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 03148 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 03149 arbb_op(detail::function::current(), arbb_op_less, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 03150 03151 return result; 03152 } 03153 03155 03158 03172 template<arbb_scalar_type_t S> 03173 nested<boolean > 03174 operator<(const scalar<S>& a, const nested<scalar<S> >& b) 03175 { 03176 nested<boolean > result; 03177 const arbb_variable_t outputs[] = {result.vm_variable()}; 03178 03179 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 03180 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 03181 arbb_op(detail::function::current(), arbb_op_less, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 03182 03183 return result; 03184 } 03185 03187 03190 03201 template<arbb_scalar_type_t S> 03202 nested<boolean > 03203 operator<(const nested<scalar<S> >& a, const scalar<S>& b) 03204 { 03205 nested<boolean > result; 03206 const arbb_variable_t outputs[] = {result.vm_variable()}; 03207 03208 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 03209 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 03210 arbb_op(detail::function::current(), arbb_op_less, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 03211 03212 return result; 03213 } 03214 03216 03219 03233 inline 03234 nested<boolean > 03235 operator&&(const uncaptured<boolean >::type& a, const nested<boolean >& b) 03236 { 03237 const boolean captured_a = a; 03238 nested<boolean > result; 03239 const arbb_variable_t outputs[] = {result.vm_variable()}; 03240 03241 const arbb_variable_t inputs[] = {captured_a.vm_variable(), b.vm_variable()}; 03242 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 03243 arbb_op(detail::function::current(), arbb_op_log_and, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 03244 03245 return result; 03246 } 03247 03249 03252 03263 inline 03264 nested<boolean > 03265 operator&&(const nested<boolean >& a, const uncaptured<boolean >::type& b) 03266 { 03267 const boolean captured_b = b; 03268 nested<boolean > result; 03269 const arbb_variable_t outputs[] = {result.vm_variable()}; 03270 03271 const arbb_variable_t inputs[] = {a.vm_variable(), captured_b.vm_variable()}; 03272 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 03273 arbb_op(detail::function::current(), arbb_op_log_and, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 03274 03275 return result; 03276 } 03277 03279 03282 03290 inline 03291 nested<boolean > 03292 operator&&(const nested<boolean >& a, const nested<boolean >& b) 03293 { 03294 nested<boolean > result; 03295 const arbb_variable_t outputs[] = {result.vm_variable()}; 03296 03297 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 03298 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 03299 arbb_op(detail::function::current(), arbb_op_log_and, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 03300 03301 return result; 03302 } 03303 03305 03308 03322 inline 03323 nested<boolean > 03324 operator&&(const boolean& a, const nested<boolean >& b) 03325 { 03326 nested<boolean > result; 03327 const arbb_variable_t outputs[] = {result.vm_variable()}; 03328 03329 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 03330 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 03331 arbb_op(detail::function::current(), arbb_op_log_and, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 03332 03333 return result; 03334 } 03335 03337 03340 03351 inline 03352 nested<boolean > 03353 operator&&(const nested<boolean >& a, const boolean& b) 03354 { 03355 nested<boolean > result; 03356 const arbb_variable_t outputs[] = {result.vm_variable()}; 03357 03358 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 03359 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 03360 arbb_op(detail::function::current(), arbb_op_log_and, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 03361 03362 return result; 03363 } 03364 03366 03369 03383 inline 03384 nested<boolean > 03385 operator||(const uncaptured<boolean >::type& a, const nested<boolean >& b) 03386 { 03387 const boolean captured_a = a; 03388 nested<boolean > result; 03389 const arbb_variable_t outputs[] = {result.vm_variable()}; 03390 03391 const arbb_variable_t inputs[] = {captured_a.vm_variable(), b.vm_variable()}; 03392 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 03393 arbb_op(detail::function::current(), arbb_op_log_or, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 03394 03395 return result; 03396 } 03397 03399 03402 03413 inline 03414 nested<boolean > 03415 operator||(const nested<boolean >& a, const uncaptured<boolean >::type& b) 03416 { 03417 const boolean captured_b = b; 03418 nested<boolean > result; 03419 const arbb_variable_t outputs[] = {result.vm_variable()}; 03420 03421 const arbb_variable_t inputs[] = {a.vm_variable(), captured_b.vm_variable()}; 03422 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 03423 arbb_op(detail::function::current(), arbb_op_log_or, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 03424 03425 return result; 03426 } 03427 03429 03432 03440 inline 03441 nested<boolean > 03442 operator||(const nested<boolean >& a, const nested<boolean >& b) 03443 { 03444 nested<boolean > result; 03445 const arbb_variable_t outputs[] = {result.vm_variable()}; 03446 03447 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 03448 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 03449 arbb_op(detail::function::current(), arbb_op_log_or, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 03450 03451 return result; 03452 } 03453 03455 03458 03472 inline 03473 nested<boolean > 03474 operator||(const boolean& a, const nested<boolean >& b) 03475 { 03476 nested<boolean > result; 03477 const arbb_variable_t outputs[] = {result.vm_variable()}; 03478 03479 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 03480 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 03481 arbb_op(detail::function::current(), arbb_op_log_or, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 03482 03483 return result; 03484 } 03485 03487 03490 03501 inline 03502 nested<boolean > 03503 operator||(const nested<boolean >& a, const boolean& b) 03504 { 03505 nested<boolean > result; 03506 const arbb_variable_t outputs[] = {result.vm_variable()}; 03507 03508 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 03509 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 03510 arbb_op(detail::function::current(), arbb_op_log_or, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 03511 03512 return result; 03513 } 03514 03516 03519 03535 template<arbb_scalar_type_t S> 03536 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> > >::type 03537 operator<<(const typename uncaptured<scalar<S> >::type& value, const nested<scalar<S> >& shift_amount) 03538 { 03539 const scalar<S> captured_value = value; 03540 nested<scalar<S> > result; 03541 detail::operator_lsh(result, captured_value, shift_amount); 03542 03543 return result; 03544 } 03545 03547 03550 03563 template<arbb_scalar_type_t S> 03564 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> > >::type 03565 operator<<(const nested<scalar<S> >& value, const typename uncaptured<scalar<S> >::type& shift_amount) 03566 { 03567 const scalar<S> captured_shift_amount = shift_amount; 03568 nested<scalar<S> > result; 03569 detail::operator_lsh(result, value, captured_shift_amount); 03570 03571 return result; 03572 } 03573 03575 03578 03588 template<arbb_scalar_type_t S> 03589 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> > >::type 03590 operator<<(const nested<scalar<S> >& value, const nested<scalar<S> >& shift_amount) 03591 { 03592 nested<scalar<S> > result; 03593 detail::operator_lsh(result, value, shift_amount); 03594 03595 return result; 03596 } 03597 03599 03602 03618 template<arbb_scalar_type_t S> 03619 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> > >::type 03620 operator<<(const scalar<S>& value, const nested<scalar<S> >& shift_amount) 03621 { 03622 nested<scalar<S> > result; 03623 detail::operator_lsh(result, value, shift_amount); 03624 03625 return result; 03626 } 03627 03629 03632 03645 template<arbb_scalar_type_t S> 03646 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> > >::type 03647 operator<<(const nested<scalar<S> >& value, const scalar<S>& shift_amount) 03648 { 03649 nested<scalar<S> > result; 03650 detail::operator_lsh(result, value, shift_amount); 03651 03652 return result; 03653 } 03654 03656 03659 03672 template<arbb_scalar_type_t S> 03673 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> >& >::type 03674 operator<<=(nested<scalar<S> >& value, const typename uncaptured<scalar<S> >::type& shift_amount) 03675 { 03676 const scalar<S> captured_shift_amount = shift_amount; 03677 detail::operator_lsh(value, value, captured_shift_amount); 03678 03679 return value; 03680 } 03681 03683 03686 03696 template<arbb_scalar_type_t S> 03697 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> >& >::type 03698 operator<<=(nested<scalar<S> >& value, const nested<scalar<S> >& shift_amount) 03699 { 03700 detail::operator_lsh(value, value, shift_amount); 03701 03702 return value; 03703 } 03704 03706 03709 03722 template<arbb_scalar_type_t S> 03723 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> >& >::type 03724 operator<<=(nested<scalar<S> >& value, const scalar<S>& shift_amount) 03725 { 03726 detail::operator_lsh(value, value, shift_amount); 03727 03728 return value; 03729 } 03730 03732 03735 03749 template<arbb_scalar_type_t S> 03750 nested<scalar<S> > 03751 max(const typename uncaptured<scalar<S> >::type& a, const nested<scalar<S> >& b) 03752 { 03753 const scalar<S> captured_a = a; 03754 nested<scalar<S> > result; 03755 const arbb_variable_t outputs[] = {result.vm_variable()}; 03756 03757 const arbb_variable_t inputs[] = {captured_a.vm_variable(), b.vm_variable()}; 03758 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 03759 arbb_op(detail::function::current(), arbb_op_max, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 03760 03761 return result; 03762 } 03763 03765 03768 03779 template<arbb_scalar_type_t S> 03780 nested<scalar<S> > 03781 max(const nested<scalar<S> >& a, const typename uncaptured<scalar<S> >::type& b) 03782 { 03783 const scalar<S> captured_b = b; 03784 nested<scalar<S> > result; 03785 const arbb_variable_t outputs[] = {result.vm_variable()}; 03786 03787 const arbb_variable_t inputs[] = {a.vm_variable(), captured_b.vm_variable()}; 03788 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 03789 arbb_op(detail::function::current(), arbb_op_max, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 03790 03791 return result; 03792 } 03793 03795 03798 03806 template<arbb_scalar_type_t S> 03807 nested<scalar<S> > 03808 max(const nested<scalar<S> >& a, const nested<scalar<S> >& b) 03809 { 03810 nested<scalar<S> > result; 03811 const arbb_variable_t outputs[] = {result.vm_variable()}; 03812 03813 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 03814 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 03815 arbb_op(detail::function::current(), arbb_op_max, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 03816 03817 return result; 03818 } 03819 03821 03824 03838 template<arbb_scalar_type_t S> 03839 nested<scalar<S> > 03840 max(const scalar<S>& a, const nested<scalar<S> >& b) 03841 { 03842 nested<scalar<S> > result; 03843 const arbb_variable_t outputs[] = {result.vm_variable()}; 03844 03845 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 03846 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 03847 arbb_op(detail::function::current(), arbb_op_max, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 03848 03849 return result; 03850 } 03851 03853 03856 03867 template<arbb_scalar_type_t S> 03868 nested<scalar<S> > 03869 max(const nested<scalar<S> >& a, const scalar<S>& b) 03870 { 03871 nested<scalar<S> > result; 03872 const arbb_variable_t outputs[] = {result.vm_variable()}; 03873 03874 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 03875 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 03876 arbb_op(detail::function::current(), arbb_op_max, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 03877 03878 return result; 03879 } 03880 03882 03885 03899 template<arbb_scalar_type_t S> 03900 nested<scalar<S> > 03901 min(const typename uncaptured<scalar<S> >::type& a, const nested<scalar<S> >& b) 03902 { 03903 const scalar<S> captured_a = a; 03904 nested<scalar<S> > result; 03905 const arbb_variable_t outputs[] = {result.vm_variable()}; 03906 03907 const arbb_variable_t inputs[] = {captured_a.vm_variable(), b.vm_variable()}; 03908 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 03909 arbb_op(detail::function::current(), arbb_op_min, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 03910 03911 return result; 03912 } 03913 03915 03918 03929 template<arbb_scalar_type_t S> 03930 nested<scalar<S> > 03931 min(const nested<scalar<S> >& a, const typename uncaptured<scalar<S> >::type& b) 03932 { 03933 const scalar<S> captured_b = b; 03934 nested<scalar<S> > result; 03935 const arbb_variable_t outputs[] = {result.vm_variable()}; 03936 03937 const arbb_variable_t inputs[] = {a.vm_variable(), captured_b.vm_variable()}; 03938 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 03939 arbb_op(detail::function::current(), arbb_op_min, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 03940 03941 return result; 03942 } 03943 03945 03948 03956 template<arbb_scalar_type_t S> 03957 nested<scalar<S> > 03958 min(const nested<scalar<S> >& a, const nested<scalar<S> >& b) 03959 { 03960 nested<scalar<S> > result; 03961 const arbb_variable_t outputs[] = {result.vm_variable()}; 03962 03963 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 03964 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 03965 arbb_op(detail::function::current(), arbb_op_min, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 03966 03967 return result; 03968 } 03969 03971 03974 03988 template<arbb_scalar_type_t S> 03989 nested<scalar<S> > 03990 min(const scalar<S>& a, const nested<scalar<S> >& b) 03991 { 03992 nested<scalar<S> > result; 03993 const arbb_variable_t outputs[] = {result.vm_variable()}; 03994 03995 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 03996 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 03997 arbb_op(detail::function::current(), arbb_op_min, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 03998 03999 return result; 04000 } 04001 04003 04006 04017 template<arbb_scalar_type_t S> 04018 nested<scalar<S> > 04019 min(const nested<scalar<S> >& a, const scalar<S>& b) 04020 { 04021 nested<scalar<S> > result; 04022 const arbb_variable_t outputs[] = {result.vm_variable()}; 04023 04024 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 04025 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 04026 arbb_op(detail::function::current(), arbb_op_min, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 04027 04028 return result; 04029 } 04030 04032 04035 04051 template<arbb_scalar_type_t S> 04052 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> > >::type 04053 operator%(const typename uncaptured<scalar<S> >::type& dividend, const nested<scalar<S> >& divisor) 04054 { 04055 const scalar<S> captured_dividend = dividend; 04056 nested<scalar<S> > result; 04057 const arbb_variable_t outputs[] = {result.vm_variable()}; 04058 04059 const arbb_variable_t inputs[] = {captured_dividend.vm_variable(), divisor.vm_variable()}; 04060 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 04061 arbb_op(detail::function::current(), arbb_op_mod, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 04062 04063 return result; 04064 } 04065 04067 04070 04083 template<arbb_scalar_type_t S> 04084 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> > >::type 04085 operator%(const nested<scalar<S> >& dividend, const typename uncaptured<scalar<S> >::type& divisor) 04086 { 04087 const scalar<S> captured_divisor = divisor; 04088 nested<scalar<S> > result; 04089 const arbb_variable_t outputs[] = {result.vm_variable()}; 04090 04091 const arbb_variable_t inputs[] = {dividend.vm_variable(), captured_divisor.vm_variable()}; 04092 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 04093 arbb_op(detail::function::current(), arbb_op_mod, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 04094 04095 return result; 04096 } 04097 04099 04102 04112 template<arbb_scalar_type_t S> 04113 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> > >::type 04114 operator%(const nested<scalar<S> >& dividend, const nested<scalar<S> >& divisor) 04115 { 04116 nested<scalar<S> > result; 04117 const arbb_variable_t outputs[] = {result.vm_variable()}; 04118 04119 const arbb_variable_t inputs[] = {dividend.vm_variable(), divisor.vm_variable()}; 04120 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 04121 arbb_op(detail::function::current(), arbb_op_mod, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 04122 04123 return result; 04124 } 04125 04127 04130 04146 template<arbb_scalar_type_t S> 04147 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> > >::type 04148 operator%(const scalar<S>& dividend, const nested<scalar<S> >& divisor) 04149 { 04150 nested<scalar<S> > result; 04151 const arbb_variable_t outputs[] = {result.vm_variable()}; 04152 04153 const arbb_variable_t inputs[] = {dividend.vm_variable(), divisor.vm_variable()}; 04154 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 04155 arbb_op(detail::function::current(), arbb_op_mod, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 04156 04157 return result; 04158 } 04159 04161 04164 04177 template<arbb_scalar_type_t S> 04178 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> > >::type 04179 operator%(const nested<scalar<S> >& dividend, const scalar<S>& divisor) 04180 { 04181 nested<scalar<S> > result; 04182 const arbb_variable_t outputs[] = {result.vm_variable()}; 04183 04184 const arbb_variable_t inputs[] = {dividend.vm_variable(), divisor.vm_variable()}; 04185 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 04186 arbb_op(detail::function::current(), arbb_op_mod, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 04187 04188 return result; 04189 } 04190 04192 04195 04208 template<arbb_scalar_type_t S> 04209 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> >& >::type 04210 operator%=(nested<scalar<S> >& value, const typename uncaptured<scalar<S> >::type& divisor) 04211 { 04212 const scalar<S> captured_divisor = divisor; 04213 const arbb_variable_t outputs[] = {value.vm_variable()}; 04214 04215 const arbb_variable_t inputs[] = {value.vm_variable(), captured_divisor.vm_variable()}; 04216 void* debug_data_ptrs[] = {value.containers_begin()->get_debug_data_ptr()}; 04217 arbb_op(detail::function::current(), arbb_op_mod, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 04218 04219 return value; 04220 } 04221 04223 04226 04236 template<arbb_scalar_type_t S> 04237 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> >& >::type 04238 operator%=(nested<scalar<S> >& value, const nested<scalar<S> >& divisor) 04239 { 04240 const arbb_variable_t outputs[] = {value.vm_variable()}; 04241 04242 const arbb_variable_t inputs[] = {value.vm_variable(), divisor.vm_variable()}; 04243 void* debug_data_ptrs[] = {value.containers_begin()->get_debug_data_ptr()}; 04244 arbb_op(detail::function::current(), arbb_op_mod, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 04245 04246 return value; 04247 } 04248 04250 04253 04266 template<arbb_scalar_type_t S> 04267 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> >& >::type 04268 operator%=(nested<scalar<S> >& value, const scalar<S>& divisor) 04269 { 04270 const arbb_variable_t outputs[] = {value.vm_variable()}; 04271 04272 const arbb_variable_t inputs[] = {value.vm_variable(), divisor.vm_variable()}; 04273 void* debug_data_ptrs[] = {value.containers_begin()->get_debug_data_ptr()}; 04274 arbb_op(detail::function::current(), arbb_op_mod, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 04275 04276 return value; 04277 } 04278 04280 04283 04298 template<arbb_scalar_type_t S> 04299 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> > >::type 04300 operator*(const typename uncaptured<scalar<S> >::type& a, const nested<scalar<S> >& b) 04301 { 04302 const scalar<S> captured_a = a; 04303 nested<scalar<S> > result; 04304 const arbb_variable_t outputs[] = {result.vm_variable()}; 04305 04306 const arbb_variable_t inputs[] = {captured_a.vm_variable(), b.vm_variable()}; 04307 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 04308 arbb_op(detail::function::current(), arbb_op_mul, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 04309 04310 return result; 04311 } 04312 04314 04317 04329 template<arbb_scalar_type_t S> 04330 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> > >::type 04331 operator*(const nested<scalar<S> >& a, const typename uncaptured<scalar<S> >::type& b) 04332 { 04333 const scalar<S> captured_b = b; 04334 nested<scalar<S> > result; 04335 const arbb_variable_t outputs[] = {result.vm_variable()}; 04336 04337 const arbb_variable_t inputs[] = {a.vm_variable(), captured_b.vm_variable()}; 04338 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 04339 arbb_op(detail::function::current(), arbb_op_mul, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 04340 04341 return result; 04342 } 04343 04345 04348 04357 template<arbb_scalar_type_t S> 04358 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> > >::type 04359 operator*(const nested<scalar<S> >& a, const nested<scalar<S> >& b) 04360 { 04361 nested<scalar<S> > result; 04362 const arbb_variable_t outputs[] = {result.vm_variable()}; 04363 04364 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 04365 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 04366 arbb_op(detail::function::current(), arbb_op_mul, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 04367 04368 return result; 04369 } 04370 04372 04375 04390 template<arbb_scalar_type_t S> 04391 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> > >::type 04392 operator*(const scalar<S>& a, const nested<scalar<S> >& b) 04393 { 04394 nested<scalar<S> > result; 04395 const arbb_variable_t outputs[] = {result.vm_variable()}; 04396 04397 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 04398 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 04399 arbb_op(detail::function::current(), arbb_op_mul, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 04400 04401 return result; 04402 } 04403 04405 04408 04420 template<arbb_scalar_type_t S> 04421 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> > >::type 04422 operator*(const nested<scalar<S> >& a, const scalar<S>& b) 04423 { 04424 nested<scalar<S> > result; 04425 const arbb_variable_t outputs[] = {result.vm_variable()}; 04426 04427 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 04428 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 04429 arbb_op(detail::function::current(), arbb_op_mul, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 04430 04431 return result; 04432 } 04433 04435 04438 04450 template<arbb_scalar_type_t S> 04451 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> >& >::type 04452 operator*=(nested<scalar<S> >& value, const typename uncaptured<scalar<S> >::type& multiplicand) 04453 { 04454 const scalar<S> captured_multiplicand = multiplicand; 04455 const arbb_variable_t outputs[] = {value.vm_variable()}; 04456 04457 const arbb_variable_t inputs[] = {value.vm_variable(), captured_multiplicand.vm_variable()}; 04458 void* debug_data_ptrs[] = {value.containers_begin()->get_debug_data_ptr()}; 04459 arbb_op(detail::function::current(), arbb_op_mul, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 04460 04461 return value; 04462 } 04463 04465 04468 04477 template<arbb_scalar_type_t S> 04478 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> >& >::type 04479 operator*=(nested<scalar<S> >& value, const nested<scalar<S> >& multiplicand) 04480 { 04481 const arbb_variable_t outputs[] = {value.vm_variable()}; 04482 04483 const arbb_variable_t inputs[] = {value.vm_variable(), multiplicand.vm_variable()}; 04484 void* debug_data_ptrs[] = {value.containers_begin()->get_debug_data_ptr()}; 04485 arbb_op(detail::function::current(), arbb_op_mul, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 04486 04487 return value; 04488 } 04489 04491 04494 04506 template<arbb_scalar_type_t S> 04507 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> >& >::type 04508 operator*=(nested<scalar<S> >& value, const scalar<S>& multiplicand) 04509 { 04510 const arbb_variable_t outputs[] = {value.vm_variable()}; 04511 04512 const arbb_variable_t inputs[] = {value.vm_variable(), multiplicand.vm_variable()}; 04513 void* debug_data_ptrs[] = {value.containers_begin()->get_debug_data_ptr()}; 04514 arbb_op(detail::function::current(), arbb_op_mul, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 04515 04516 return value; 04517 } 04518 04520 04523 04537 template<arbb_scalar_type_t S> 04538 nested<boolean > 04539 operator!=(const typename uncaptured<scalar<S> >::type& a, const nested<scalar<S> >& b) 04540 { 04541 const scalar<S> captured_a = a; 04542 nested<boolean > result; 04543 const arbb_variable_t outputs[] = {result.vm_variable()}; 04544 04545 const arbb_variable_t inputs[] = {captured_a.vm_variable(), b.vm_variable()}; 04546 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 04547 arbb_op(detail::function::current(), arbb_op_neq, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 04548 04549 return result; 04550 } 04551 04553 04556 04567 template<arbb_scalar_type_t S> 04568 nested<boolean > 04569 operator!=(const nested<scalar<S> >& a, const typename uncaptured<scalar<S> >::type& b) 04570 { 04571 const scalar<S> captured_b = b; 04572 nested<boolean > result; 04573 const arbb_variable_t outputs[] = {result.vm_variable()}; 04574 04575 const arbb_variable_t inputs[] = {a.vm_variable(), captured_b.vm_variable()}; 04576 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 04577 arbb_op(detail::function::current(), arbb_op_neq, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 04578 04579 return result; 04580 } 04581 04583 04586 04594 template<arbb_scalar_type_t S> 04595 nested<boolean > 04596 operator!=(const nested<scalar<S> >& a, const nested<scalar<S> >& b) 04597 { 04598 nested<boolean > result; 04599 const arbb_variable_t outputs[] = {result.vm_variable()}; 04600 04601 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 04602 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 04603 arbb_op(detail::function::current(), arbb_op_neq, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 04604 04605 return result; 04606 } 04607 04609 04612 04626 template<arbb_scalar_type_t S> 04627 nested<boolean > 04628 operator!=(const scalar<S>& a, const nested<scalar<S> >& b) 04629 { 04630 nested<boolean > result; 04631 const arbb_variable_t outputs[] = {result.vm_variable()}; 04632 04633 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 04634 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 04635 arbb_op(detail::function::current(), arbb_op_neq, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 04636 04637 return result; 04638 } 04639 04641 04644 04655 template<arbb_scalar_type_t S> 04656 nested<boolean > 04657 operator!=(const nested<scalar<S> >& a, const scalar<S>& b) 04658 { 04659 nested<boolean > result; 04660 const arbb_variable_t outputs[] = {result.vm_variable()}; 04661 04662 const arbb_variable_t inputs[] = {a.vm_variable(), b.vm_variable()}; 04663 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 04664 arbb_op(detail::function::current(), arbb_op_neq, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 04665 04666 return result; 04667 } 04668 04670 04673 04688 template<arbb_scalar_type_t S> 04689 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_fp< scalar<S> >::value, nested<scalar<S> > >::type 04690 pow(const typename uncaptured<scalar<S> >::type& base, const nested<scalar<S> >& exponent) 04691 { 04692 const scalar<S> captured_base = base; 04693 nested<scalar<S> > result; 04694 const arbb_variable_t outputs[] = {result.vm_variable()}; 04695 04696 const arbb_variable_t inputs[] = {captured_base.vm_variable(), exponent.vm_variable()}; 04697 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 04698 arbb_op(detail::function::current(), arbb_op_pow, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 04699 04700 return result; 04701 } 04702 04704 04707 04719 template<arbb_scalar_type_t S> 04720 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_fp< scalar<S> >::value, nested<scalar<S> > >::type 04721 pow(const nested<scalar<S> >& base, const typename uncaptured<scalar<S> >::type& exponent) 04722 { 04723 const scalar<S> captured_exponent = exponent; 04724 nested<scalar<S> > result; 04725 const arbb_variable_t outputs[] = {result.vm_variable()}; 04726 04727 const arbb_variable_t inputs[] = {base.vm_variable(), captured_exponent.vm_variable()}; 04728 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 04729 arbb_op(detail::function::current(), arbb_op_pow, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 04730 04731 return result; 04732 } 04733 04735 04738 04747 template<arbb_scalar_type_t S> 04748 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_fp< scalar<S> >::value, nested<scalar<S> > >::type 04749 pow(const nested<scalar<S> >& base, const nested<scalar<S> >& exponent) 04750 { 04751 nested<scalar<S> > result; 04752 const arbb_variable_t outputs[] = {result.vm_variable()}; 04753 04754 const arbb_variable_t inputs[] = {base.vm_variable(), exponent.vm_variable()}; 04755 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 04756 arbb_op(detail::function::current(), arbb_op_pow, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 04757 04758 return result; 04759 } 04760 04762 04765 04780 template<arbb_scalar_type_t S> 04781 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_fp< scalar<S> >::value, nested<scalar<S> > >::type 04782 pow(const scalar<S>& base, const nested<scalar<S> >& exponent) 04783 { 04784 nested<scalar<S> > result; 04785 const arbb_variable_t outputs[] = {result.vm_variable()}; 04786 04787 const arbb_variable_t inputs[] = {base.vm_variable(), exponent.vm_variable()}; 04788 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 04789 arbb_op(detail::function::current(), arbb_op_pow, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 04790 04791 return result; 04792 } 04793 04795 04798 04810 template<arbb_scalar_type_t S> 04811 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_fp< scalar<S> >::value, nested<scalar<S> > >::type 04812 pow(const nested<scalar<S> >& base, const scalar<S>& exponent) 04813 { 04814 nested<scalar<S> > result; 04815 const arbb_variable_t outputs[] = {result.vm_variable()}; 04816 04817 const arbb_variable_t inputs[] = {base.vm_variable(), exponent.vm_variable()}; 04818 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 04819 arbb_op(detail::function::current(), arbb_op_pow, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 04820 04821 return result; 04822 } 04823 04825 04828 04844 template<arbb_scalar_type_t S> 04845 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> > >::type 04846 operator>>(const typename uncaptured<scalar<S> >::type& value, const nested<scalar<S> >& shift_amount) 04847 { 04848 const scalar<S> captured_value = value; 04849 nested<scalar<S> > result; 04850 detail::operator_rsh(result, captured_value, shift_amount); 04851 04852 return result; 04853 } 04854 04856 04859 04872 template<arbb_scalar_type_t S> 04873 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> > >::type 04874 operator>>(const nested<scalar<S> >& value, const typename uncaptured<scalar<S> >::type& shift_amount) 04875 { 04876 const scalar<S> captured_shift_amount = shift_amount; 04877 nested<scalar<S> > result; 04878 detail::operator_rsh(result, value, captured_shift_amount); 04879 04880 return result; 04881 } 04882 04884 04887 04897 template<arbb_scalar_type_t S> 04898 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> > >::type 04899 operator>>(const nested<scalar<S> >& value, const nested<scalar<S> >& shift_amount) 04900 { 04901 nested<scalar<S> > result; 04902 detail::operator_rsh(result, value, shift_amount); 04903 04904 return result; 04905 } 04906 04908 04911 04927 template<arbb_scalar_type_t S> 04928 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> > >::type 04929 operator>>(const scalar<S>& value, const nested<scalar<S> >& shift_amount) 04930 { 04931 nested<scalar<S> > result; 04932 detail::operator_rsh(result, value, shift_amount); 04933 04934 return result; 04935 } 04936 04938 04941 04954 template<arbb_scalar_type_t S> 04955 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> > >::type 04956 operator>>(const nested<scalar<S> >& value, const scalar<S>& shift_amount) 04957 { 04958 nested<scalar<S> > result; 04959 detail::operator_rsh(result, value, shift_amount); 04960 04961 return result; 04962 } 04963 04965 04968 04981 template<arbb_scalar_type_t S> 04982 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> >& >::type 04983 operator>>=(nested<scalar<S> >& value, const typename uncaptured<scalar<S> >::type& shift_amount) 04984 { 04985 const scalar<S> captured_shift_amount = shift_amount; 04986 detail::operator_rsh(value, value, captured_shift_amount); 04987 04988 return value; 04989 } 04990 04992 04995 05005 template<arbb_scalar_type_t S> 05006 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> >& >::type 05007 operator>>=(nested<scalar<S> >& value, const nested<scalar<S> >& shift_amount) 05008 { 05009 detail::operator_rsh(value, value, shift_amount); 05010 05011 return value; 05012 } 05013 05015 05018 05031 template<arbb_scalar_type_t S> 05032 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> >& >::type 05033 operator>>=(nested<scalar<S> >& value, const scalar<S>& shift_amount) 05034 { 05035 detail::operator_rsh(value, value, shift_amount); 05036 05037 return value; 05038 } 05039 05041 05044 05059 template<arbb_scalar_type_t S> 05060 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> > >::type 05061 operator-(const typename uncaptured<scalar<S> >::type& value, const nested<scalar<S> >& amount) 05062 { 05063 const scalar<S> captured_value = value; 05064 nested<scalar<S> > result; 05065 const arbb_variable_t outputs[] = {result.vm_variable()}; 05066 05067 const arbb_variable_t inputs[] = {captured_value.vm_variable(), amount.vm_variable()}; 05068 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 05069 arbb_op(detail::function::current(), arbb_op_sub, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 05070 05071 return result; 05072 } 05073 05075 05078 05090 template<arbb_scalar_type_t S> 05091 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> > >::type 05092 operator-(const nested<scalar<S> >& value, const typename uncaptured<scalar<S> >::type& amount) 05093 { 05094 const scalar<S> captured_amount = amount; 05095 nested<scalar<S> > result; 05096 const arbb_variable_t outputs[] = {result.vm_variable()}; 05097 05098 const arbb_variable_t inputs[] = {value.vm_variable(), captured_amount.vm_variable()}; 05099 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 05100 arbb_op(detail::function::current(), arbb_op_sub, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 05101 05102 return result; 05103 } 05104 05106 05109 05118 template<arbb_scalar_type_t S> 05119 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> > >::type 05120 operator-(const nested<scalar<S> >& value, const nested<scalar<S> >& amount) 05121 { 05122 nested<scalar<S> > result; 05123 const arbb_variable_t outputs[] = {result.vm_variable()}; 05124 05125 const arbb_variable_t inputs[] = {value.vm_variable(), amount.vm_variable()}; 05126 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 05127 arbb_op(detail::function::current(), arbb_op_sub, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 05128 05129 return result; 05130 } 05131 05133 05136 05151 template<arbb_scalar_type_t S> 05152 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> > >::type 05153 operator-(const scalar<S>& value, const nested<scalar<S> >& amount) 05154 { 05155 nested<scalar<S> > result; 05156 const arbb_variable_t outputs[] = {result.vm_variable()}; 05157 05158 const arbb_variable_t inputs[] = {value.vm_variable(), amount.vm_variable()}; 05159 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 05160 arbb_op(detail::function::current(), arbb_op_sub, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 05161 05162 return result; 05163 } 05164 05166 05169 05181 template<arbb_scalar_type_t S> 05182 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> > >::type 05183 operator-(const nested<scalar<S> >& value, const scalar<S>& amount) 05184 { 05185 nested<scalar<S> > result; 05186 const arbb_variable_t outputs[] = {result.vm_variable()}; 05187 05188 const arbb_variable_t inputs[] = {value.vm_variable(), amount.vm_variable()}; 05189 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 05190 arbb_op(detail::function::current(), arbb_op_sub, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 05191 05192 return result; 05193 } 05194 05196 05199 05211 template<arbb_scalar_type_t S> 05212 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> >& >::type 05213 operator-=(nested<scalar<S> >& value, const typename uncaptured<scalar<S> >::type& amount) 05214 { 05215 const scalar<S> captured_amount = amount; 05216 const arbb_variable_t outputs[] = {value.vm_variable()}; 05217 05218 const arbb_variable_t inputs[] = {value.vm_variable(), captured_amount.vm_variable()}; 05219 void* debug_data_ptrs[] = {value.containers_begin()->get_debug_data_ptr()}; 05220 arbb_op(detail::function::current(), arbb_op_sub, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 05221 05222 return value; 05223 } 05224 05226 05229 05238 template<arbb_scalar_type_t S> 05239 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> >& >::type 05240 operator-=(nested<scalar<S> >& value, const nested<scalar<S> >& amount) 05241 { 05242 const arbb_variable_t outputs[] = {value.vm_variable()}; 05243 05244 const arbb_variable_t inputs[] = {value.vm_variable(), amount.vm_variable()}; 05245 void* debug_data_ptrs[] = {value.containers_begin()->get_debug_data_ptr()}; 05246 arbb_op(detail::function::current(), arbb_op_sub, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 05247 05248 return value; 05249 } 05250 05252 05255 05267 template<arbb_scalar_type_t S> 05268 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> >& >::type 05269 operator-=(nested<scalar<S> >& value, const scalar<S>& amount) 05270 { 05271 const arbb_variable_t outputs[] = {value.vm_variable()}; 05272 05273 const arbb_variable_t inputs[] = {value.vm_variable(), amount.vm_variable()}; 05274 void* debug_data_ptrs[] = {value.containers_begin()->get_debug_data_ptr()}; 05275 arbb_op(detail::function::current(), arbb_op_sub, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 05276 05277 return value; 05278 } 05279 05281 05284 05300 template<arbb_scalar_type_t S> 05301 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> > >::type 05302 operator^(const typename uncaptured<scalar<S> >::type& value, const nested<scalar<S> >& mask) 05303 { 05304 const scalar<S> captured_value = value; 05305 nested<scalar<S> > result; 05306 const arbb_variable_t outputs[] = {result.vm_variable()}; 05307 05308 const arbb_variable_t inputs[] = {captured_value.vm_variable(), mask.vm_variable()}; 05309 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 05310 arbb_op(detail::function::current(), arbb_op_bit_xor, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 05311 05312 return result; 05313 } 05314 05316 05319 05332 template<arbb_scalar_type_t S> 05333 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> > >::type 05334 operator^(const nested<scalar<S> >& value, const typename uncaptured<scalar<S> >::type& mask) 05335 { 05336 const scalar<S> captured_mask = mask; 05337 nested<scalar<S> > result; 05338 const arbb_variable_t outputs[] = {result.vm_variable()}; 05339 05340 const arbb_variable_t inputs[] = {value.vm_variable(), captured_mask.vm_variable()}; 05341 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 05342 arbb_op(detail::function::current(), arbb_op_bit_xor, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 05343 05344 return result; 05345 } 05346 05348 05351 05361 template<arbb_scalar_type_t S> 05362 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> > >::type 05363 operator^(const nested<scalar<S> >& value, const nested<scalar<S> >& mask) 05364 { 05365 nested<scalar<S> > result; 05366 const arbb_variable_t outputs[] = {result.vm_variable()}; 05367 05368 const arbb_variable_t inputs[] = {value.vm_variable(), mask.vm_variable()}; 05369 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 05370 arbb_op(detail::function::current(), arbb_op_bit_xor, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 05371 05372 return result; 05373 } 05374 05376 05379 05395 template<arbb_scalar_type_t S> 05396 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> > >::type 05397 operator^(const scalar<S>& value, const nested<scalar<S> >& mask) 05398 { 05399 nested<scalar<S> > result; 05400 const arbb_variable_t outputs[] = {result.vm_variable()}; 05401 05402 const arbb_variable_t inputs[] = {value.vm_variable(), mask.vm_variable()}; 05403 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 05404 arbb_op(detail::function::current(), arbb_op_bit_xor, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 05405 05406 return result; 05407 } 05408 05410 05413 05426 template<arbb_scalar_type_t S> 05427 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> > >::type 05428 operator^(const nested<scalar<S> >& value, const scalar<S>& mask) 05429 { 05430 nested<scalar<S> > result; 05431 const arbb_variable_t outputs[] = {result.vm_variable()}; 05432 05433 const arbb_variable_t inputs[] = {value.vm_variable(), mask.vm_variable()}; 05434 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 05435 arbb_op(detail::function::current(), arbb_op_bit_xor, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 05436 05437 return result; 05438 } 05439 05441 05444 05457 template<arbb_scalar_type_t S> 05458 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> >& >::type 05459 operator^=(nested<scalar<S> >& value, const typename uncaptured<scalar<S> >::type& mask) 05460 { 05461 const scalar<S> captured_mask = mask; 05462 const arbb_variable_t outputs[] = {value.vm_variable()}; 05463 05464 const arbb_variable_t inputs[] = {value.vm_variable(), captured_mask.vm_variable()}; 05465 void* debug_data_ptrs[] = {value.containers_begin()->get_debug_data_ptr()}; 05466 arbb_op(detail::function::current(), arbb_op_bit_xor, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 05467 05468 return value; 05469 } 05470 05472 05475 05485 template<arbb_scalar_type_t S> 05486 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> >& >::type 05487 operator^=(nested<scalar<S> >& value, const nested<scalar<S> >& mask) 05488 { 05489 const arbb_variable_t outputs[] = {value.vm_variable()}; 05490 05491 const arbb_variable_t inputs[] = {value.vm_variable(), mask.vm_variable()}; 05492 void* debug_data_ptrs[] = {value.containers_begin()->get_debug_data_ptr()}; 05493 arbb_op(detail::function::current(), arbb_op_bit_xor, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 05494 05495 return value; 05496 } 05497 05499 05502 05515 template<arbb_scalar_type_t S> 05516 typename ARBB_CPP_NS::detail::disable_if<!detail::is_scalar_int< scalar<S> >::value, nested<scalar<S> >& >::type 05517 operator^=(nested<scalar<S> >& value, const scalar<S>& mask) 05518 { 05519 const arbb_variable_t outputs[] = {value.vm_variable()}; 05520 05521 const arbb_variable_t inputs[] = {value.vm_variable(), mask.vm_variable()}; 05522 void* debug_data_ptrs[] = {value.containers_begin()->get_debug_data_ptr()}; 05523 arbb_op(detail::function::current(), arbb_op_bit_xor, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 05524 05525 return value; 05526 } 05527 05529 05532 05547 template<arbb_scalar_type_t S> 05548 nested<scalar<S> > 05549 select(const typename uncaptured<boolean >::type& condition, const nested<scalar<S> >& true_case, const nested<scalar<S> >& false_case) 05550 { 05551 const boolean captured_condition = condition; 05552 nested<scalar<S> > result; 05553 const arbb_variable_t outputs[] = {result.vm_variable()}; 05554 05555 const arbb_variable_t inputs[] = {captured_condition.vm_variable(), true_case.vm_variable(), false_case.vm_variable()}; 05556 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 05557 arbb_op(detail::function::current(), arbb_op_select, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 05558 05559 return result; 05560 } 05561 05563 05566 05581 template<arbb_scalar_type_t S> 05582 nested<scalar<S> > 05583 select(const nested<boolean >& condition, const typename uncaptured<scalar<S> >::type& true_case, const nested<scalar<S> >& false_case) 05584 { 05585 const scalar<S> captured_true_case = true_case; 05586 nested<scalar<S> > result; 05587 const arbb_variable_t outputs[] = {result.vm_variable()}; 05588 05589 const arbb_variable_t inputs[] = {condition.vm_variable(), captured_true_case.vm_variable(), false_case.vm_variable()}; 05590 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 05591 arbb_op(detail::function::current(), arbb_op_select, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 05592 05593 return result; 05594 } 05595 05597 05600 05618 template<arbb_scalar_type_t S> 05619 nested<scalar<S> > 05620 select(const typename uncaptured<boolean >::type& condition, const typename uncaptured<scalar<S> >::type& true_case, const nested<scalar<S> >& false_case) 05621 { 05622 const boolean captured_condition = condition; 05623 const scalar<S> captured_true_case = true_case; 05624 nested<scalar<S> > result; 05625 const arbb_variable_t outputs[] = {result.vm_variable()}; 05626 05627 const arbb_variable_t inputs[] = {captured_condition.vm_variable(), captured_true_case.vm_variable(), false_case.vm_variable()}; 05628 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 05629 arbb_op(detail::function::current(), arbb_op_select, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 05630 05631 return result; 05632 } 05633 05635 05638 05650 template<arbb_scalar_type_t S> 05651 nested<scalar<S> > 05652 select(const nested<boolean >& condition, const nested<scalar<S> >& true_case, const typename uncaptured<scalar<S> >::type& false_case) 05653 { 05654 const scalar<S> captured_false_case = false_case; 05655 nested<scalar<S> > result; 05656 const arbb_variable_t outputs[] = {result.vm_variable()}; 05657 05658 const arbb_variable_t inputs[] = {condition.vm_variable(), true_case.vm_variable(), captured_false_case.vm_variable()}; 05659 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 05660 arbb_op(detail::function::current(), arbb_op_select, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 05661 05662 return result; 05663 } 05664 05666 05669 05684 template<arbb_scalar_type_t S> 05685 nested<scalar<S> > 05686 select(const typename uncaptured<boolean >::type& condition, const nested<scalar<S> >& true_case, const typename uncaptured<scalar<S> >::type& false_case) 05687 { 05688 const boolean captured_condition = condition; 05689 const scalar<S> captured_false_case = false_case; 05690 nested<scalar<S> > result; 05691 const arbb_variable_t outputs[] = {result.vm_variable()}; 05692 05693 const arbb_variable_t inputs[] = {captured_condition.vm_variable(), true_case.vm_variable(), captured_false_case.vm_variable()}; 05694 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 05695 arbb_op(detail::function::current(), arbb_op_select, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 05696 05697 return result; 05698 } 05699 05701 05704 05713 template<arbb_scalar_type_t S> 05714 nested<scalar<S> > 05715 select(const nested<boolean >& condition, const nested<scalar<S> >& true_case, const nested<scalar<S> >& false_case) 05716 { 05717 nested<scalar<S> > result; 05718 const arbb_variable_t outputs[] = {result.vm_variable()}; 05719 05720 const arbb_variable_t inputs[] = {condition.vm_variable(), true_case.vm_variable(), false_case.vm_variable()}; 05721 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 05722 arbb_op(detail::function::current(), arbb_op_select, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 05723 05724 return result; 05725 } 05726 05728 05731 05746 template<arbb_scalar_type_t S> 05747 nested<scalar<S> > 05748 select(const boolean& condition, const nested<scalar<S> >& true_case, const nested<scalar<S> >& false_case) 05749 { 05750 nested<scalar<S> > result; 05751 const arbb_variable_t outputs[] = {result.vm_variable()}; 05752 05753 const arbb_variable_t inputs[] = {condition.vm_variable(), true_case.vm_variable(), false_case.vm_variable()}; 05754 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 05755 arbb_op(detail::function::current(), arbb_op_select, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 05756 05757 return result; 05758 } 05759 05761 05764 05779 template<arbb_scalar_type_t S> 05780 nested<scalar<S> > 05781 select(const nested<boolean >& condition, const scalar<S>& true_case, const nested<scalar<S> >& false_case) 05782 { 05783 nested<scalar<S> > result; 05784 const arbb_variable_t outputs[] = {result.vm_variable()}; 05785 05786 const arbb_variable_t inputs[] = {condition.vm_variable(), true_case.vm_variable(), false_case.vm_variable()}; 05787 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 05788 arbb_op(detail::function::current(), arbb_op_select, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 05789 05790 return result; 05791 } 05792 05794 05797 05815 template<arbb_scalar_type_t S> 05816 nested<scalar<S> > 05817 select(const boolean& condition, const scalar<S>& true_case, const nested<scalar<S> >& false_case) 05818 { 05819 nested<scalar<S> > result; 05820 const arbb_variable_t outputs[] = {result.vm_variable()}; 05821 05822 const arbb_variable_t inputs[] = {condition.vm_variable(), true_case.vm_variable(), false_case.vm_variable()}; 05823 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 05824 arbb_op(detail::function::current(), arbb_op_select, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 05825 05826 return result; 05827 } 05828 05830 05833 05845 template<arbb_scalar_type_t S> 05846 nested<scalar<S> > 05847 select(const nested<boolean >& condition, const nested<scalar<S> >& true_case, const scalar<S>& false_case) 05848 { 05849 nested<scalar<S> > result; 05850 const arbb_variable_t outputs[] = {result.vm_variable()}; 05851 05852 const arbb_variable_t inputs[] = {condition.vm_variable(), true_case.vm_variable(), false_case.vm_variable()}; 05853 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 05854 arbb_op(detail::function::current(), arbb_op_select, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 05855 05856 return result; 05857 } 05858 05860 05863 05878 template<arbb_scalar_type_t S> 05879 nested<scalar<S> > 05880 select(const boolean& condition, const nested<scalar<S> >& true_case, const scalar<S>& false_case) 05881 { 05882 nested<scalar<S> > result; 05883 const arbb_variable_t outputs[] = {result.vm_variable()}; 05884 05885 const arbb_variable_t inputs[] = {condition.vm_variable(), true_case.vm_variable(), false_case.vm_variable()}; 05886 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 05887 arbb_op(detail::function::current(), arbb_op_select, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 05888 05889 return result; 05890 } 05891 05893 05896 05911 template<arbb_scalar_type_t S> 05912 nested<scalar<S> > 05913 select(const nested<boolean >& condition, const scalar<S>& true_case, const scalar<S>& false_case) 05914 { 05915 nested<scalar<S> > result; 05916 const arbb_variable_t outputs[] = {result.vm_variable()}; 05917 05918 const arbb_variable_t inputs[] = {condition.vm_variable(), true_case.vm_variable(), false_case.vm_variable()}; 05919 void* debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 05920 arbb_op(detail::function::current(), arbb_op_select, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 05921 05922 return result; 05923 } 05924 05926 05929 05937 template<arbb_scalar_type_t S> 05938 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> >& >::type 05939 operator++(nested<scalar<S> >& value) 05940 { 05941 const arbb_variable_t outputs[] = {value.vm_variable()}; 05942 05943 scalar<S> constant_one(1); 05944 05945 const arbb_variable_t inputs[] = {value.vm_variable(), constant_one.vm_variable()}; 05946 void* debug_data_ptrs[] = {value.containers_begin()->get_debug_data_ptr()}; 05947 arbb_op(detail::function::current(), arbb_op_add, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 05948 05949 return value; 05950 } 05951 05953 05956 05964 template<arbb_scalar_type_t S> 05965 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> > >::type 05966 operator++(nested<scalar<S> >& value, int) 05967 { 05968 nested<scalar<S> > original_value = value; 05969 const arbb_variable_t outputs[] = {value.vm_variable()}; 05970 05971 scalar<S> constant_one(1); 05972 05973 const arbb_variable_t inputs[] = {value.vm_variable(), constant_one.vm_variable()}; 05974 void* debug_data_ptrs[] = {value.containers_begin()->get_debug_data_ptr()}; 05975 arbb_op(detail::function::current(), arbb_op_add, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 05976 05977 return original_value; 05978 } 05979 05981 05984 05992 template<arbb_scalar_type_t S> 05993 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> >& >::type 05994 operator--(nested<scalar<S> >& value) 05995 { 05996 const arbb_variable_t outputs[] = {value.vm_variable()}; 05997 05998 scalar<S> constant_one(1); 05999 06000 const arbb_variable_t inputs[] = {value.vm_variable(), constant_one.vm_variable()}; 06001 void* debug_data_ptrs[] = {value.containers_begin()->get_debug_data_ptr()}; 06002 arbb_op(detail::function::current(), arbb_op_sub, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 06003 06004 return value; 06005 } 06006 06008 06011 06019 template<arbb_scalar_type_t S> 06020 typename ARBB_CPP_NS::detail::disable_if<detail::is_scalar_boolean< scalar<S> >::value, nested<scalar<S> > >::type 06021 operator--(nested<scalar<S> >& value, int) 06022 { 06023 nested<scalar<S> > original_value = value; 06024 const arbb_variable_t outputs[] = {value.vm_variable()}; 06025 06026 scalar<S> constant_one(1); 06027 06028 const arbb_variable_t inputs[] = {value.vm_variable(), constant_one.vm_variable()}; 06029 void* debug_data_ptrs[] = {value.containers_begin()->get_debug_data_ptr()}; 06030 arbb_op(detail::function::current(), arbb_op_sub, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 06031 06032 return original_value; 06033 } 06034 06036 06037 06040 06048 template<arbb_scalar_type_t s> 06049 typename ARBB_CPP_NS::detail::enable_if<detail::is_scalar_unsigned_int< scalar<s> >::value, nested<typename detail::signed_type<scalar<s> >::type> >::type 06050 operator-(const nested<scalar<s> >& value) 06051 { 06052 nested<typename detail::signed_type<scalar<s> >::type> result(value); 06053 return -result; 06054 } 06055 06057 06060 06075 template<typename U> 06076 typename detail::disable_if<!detail::is_uncaptured_scalar<U>::value, nested<typename captured<U>::type> >::type 06077 select(const nested<boolean >& condition, const U& true_case, const U& false_case) 06078 { 06079 typename captured<U>::type captured_true_case = true_case; 06080 typename captured<U>::type captured_false_case = false_case; 06081 nested<typename captured<U>::type> result; 06082 const arbb_variable_t outputs[] = {result.vm_variable()}; 06083 06084 const arbb_variable_t inputs[] = {condition.vm_variable(), true_case.vm_variable(), false_case.vm_variable()}; 06085 void** debug_data_ptrs[] = {result.containers_begin()->get_debug_data_ptr()}; 06086 arbb_op(detail::function::current(), arbb_op_select, outputs, inputs, debug_data_ptrs, detail::throw_on_error_details()); 06087 06088 return result; 06089 } 06090 06092 06093 06094 06095 } // namespace ARBB_CPP_NS 06096 06097 06098 06099 #endif // ARBB_CPP_ELEMENTWISE_NESTED_SCALAR_HPP 06100 06101
Copyright © 2010, Intel Corporation. All rights reserved.