|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r82531 - sandbox/boost_docs/subprojects/DebuggerVisualizers
From: john_at_[hidden]
Date: 2013-01-18 08:30:14
Author: johnmaddock
Date: 2013-01-18 08:30:13 EST (Fri, 18 Jan 2013)
New Revision: 82531
URL: http://svn.boost.org/trac/boost/changeset/82531
Log:
Add multiprecision visualizers.
Added:
sandbox/boost_docs/subprojects/DebuggerVisualizers/multiprecision.vis.txt (contents, props changed)
Added: sandbox/boost_docs/subprojects/DebuggerVisualizers/multiprecision.vis.txt
==============================================================================
--- (empty file)
+++ sandbox/boost_docs/subprojects/DebuggerVisualizers/multiprecision.vis.txt 2013-01-18 08:30:13 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,140 @@
+;------------------------------------------------------------------------------
+; Boost.Multiprecision:
+; Currently support for cpp_int and cpp_dec_float.
+;------------------------------------------------------------------------------
+
+
+boost::multiprecision::number<boost::multiprecision::backends::debug_adaptor<*>,*>{
+ preview(
+ #(
+ $e.m_backend.debug_value
+ )
+ )
+}
+
+boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<*,*,1,*,void>,*>{
+ preview(
+ #if($e.m_backend.m_limbs == 1) (
+ #if($e.m_backend.m_sign) ( -1 * (__int64)($e.m_backend.m_wrapper.m_data[0]) ) #else ($e.m_backend.m_wrapper.m_data[0])
+ )
+ #elif(($e.m_backend.m_limbs == 2) && ($e.m_backend.m_wrapper.m_data[1] < 0x80000000)) (
+ #if($e.m_backend.m_sign) ( -1 * (__int64)($e.m_backend.m_wrapper.m_data[0] | ((__int64)$e.m_backend.m_wrapper.m_data[1] << 32)) ) #else ($e.m_backend.m_wrapper.m_data[0] | ((__int64)$e.m_backend.m_wrapper.m_data[1] << 32))
+ ) #else (
+ #( "signbit = ", $e.m_backend.m_sign, " data = ", #array ( expr: $e.m_backend.m_wrapper.m_data[$e.m_backend.m_limbs - $i - 1], size: $e.m_backend.m_limbs ) : [$e,x] )
+ )
+ )
+
+ children (
+ #(
+ ~raw: [$c,!],
+ sign bit: $e.m_backend.m_sign,
+ #array (
+ expr: $e.m_backend.m_wrapper.m_data[$e.m_backend.m_limbs - $i - 1],
+ size: $e.m_backend.m_limbs
+ ) : [$e,x]
+ )
+ )
+}
+
+boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<*,*,0,*,void>,*>{
+ preview(
+ #if($e.m_backend.m_limbs == 1) (
+ $e.m_backend.m_wrapper.m_data[0]
+ )
+ #elif($e.m_backend.m_limbs == 2) (
+ $e.m_backend.m_wrapper.m_data[0] | ((__int64)$e.m_backend.m_wrapper.m_data[1] << 32)
+ ) #else (
+ #array ( expr: $e.m_backend.m_wrapper.m_data[$e.m_backend.m_limbs - $i - 1], size: $e.m_backend.m_limbs ) : [$e,x]
+ )
+ )
+
+ children (
+ #(
+ ~raw: [$c,!],
+ #array (
+ expr: $e.m_backend.m_wrapper.m_data[$e.m_backend.m_limbs - $i - 1],
+ size: $e.m_backend.m_limbs
+ ) : [$e,x]
+ )
+ )
+}
+
+boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<0,0,1,*,*>,*>{
+ preview(
+ #if ($e.m_backend.m_internal) (
+ #if($e.m_backend.m_limbs == 1) (
+ #if($e.m_backend.m_sign) ( -1 * (__int64)($e.m_backend.m_data.first) ) #else($e.m_backend.m_data.first)
+ ) #elif(($e.m_backend.m_limbs == 2) && ($e.m_backend.m_data.la[1] < 0x80000000)) (
+ #if($e.m_backend.m_sign) ( -1 * (__int64)($e.m_backend.m_data.double_first) ) #else($e.m_backend.m_data.double_first)
+ ) #else(
+ #( "signbit = ", $e.m_backend.m_sign, " data = ", #array ( expr: $e.m_backend.m_data.la[$e.m_backend.m_limbs - $i - 1], size: $e.m_backend.m_limbs ) : [$e,x] )
+ )
+ ) #else(
+ #if($e.m_backend.m_limbs == 1) (
+ #if($e.m_backend.m_sign) ( -1 * (__int64)($e.m_backend.m_data.ld.data[0]) ) #else($e.m_backend.m_data.ld.data[0])
+ ) #elif(($e.m_backend.m_limbs == 2) && ($e.m_backend.m_data.ld.data[1] < 0x80000000)) (
+ #if($e.m_backend.m_sign) ( -1 * (__int64)($e.m_backend.m_data.ld.data[0] | ((__int64)$e.m_backend.m_data.ld.data[1] << 32)) ) #else($e.m_backend.m_data.ld.data[0] | ((__int64)$e.m_backend.m_data.ld.data[1] << 32))
+ ) #else(
+ #( "signbit = ", $e.m_backend.m_sign, " data = ", #array ( expr: $e.m_backend.m_data.ld.data[$e.m_backend.m_limbs - $i - 1], size: $e.m_backend.m_limbs ) : [$e,x] )
+ )
+ )
+ )
+
+ children (
+ #if ($e.m_backend.m_internal) (
+ #if($e.m_backend.m_limbs == 1) (
+ #(value: $e.m_backend.m_data.first)
+ ) #elif($e.m_backend.m_limbs == 1) (
+ #(value: $e.m_backend.m_data.double_first)
+ ) #else (
+ #(
+ sign bit: $e.m_backend.m_sign,
+ #array (
+ expr: $e.m_backend.m_data.la[$e.m_backend.m_limbs - $i - 1],
+ size: $e.m_backend.m_limbs
+ ) : [$e,x]
+ )
+ )
+ ) #else (
+ #(
+ ~raw: [$c,!],
+ sign bit: $e.m_backend.m_sign,
+ #array (
+ expr: $e.m_backend.m_data.ld.data[$e.m_backend.m_limbs - $i - 1],
+ size: $e.m_backend.m_limbs
+ ) : [$e,x]
+ )
+ )
+ )
+}
+
+boost::multiprecision::number<boost::multiprecision::backends::cpp_dec_float<*,*,void>,*>{
+ preview(
+ #if($e.m_backend.exp != 0)(
+ #if($e.m_backend.neg)(
+ #("-", [$e.m_backend.data.elems[0],u], ".", [$e.m_backend.data.elems[1],u], [$e.m_backend.data.elems[2],u], "...e", [$e.m_backend.exp,d])
+ ) #else(
+ #([$e.m_backend.data.elems[0],u], ".", [$e.m_backend.data.elems[1],u], [$e.m_backend.data.elems[2],u], "...e", [$e.m_backend.exp,d])
+ )
+ )#else(
+ #if($e.m_backend.neg)(
+ #("-", [$e.m_backend.data.elems[0],u], ".", [$e.m_backend.data.elems[1],u], [$e.m_backend.data.elems[2],u], "...")
+ ) #else(
+ #([$e.m_backend.data.elems[0],u], ".", [$e.m_backend.data.elems[1],u], [$e.m_backend.data.elems[2],u], "...")
+ )
+ )
+ )
+ children(
+ #(
+ sign bit: $e.m_backend.neg,
+ exponent: $e.m_backend.exp,
+ ~raw: [$c,!],
+ #array(
+ expr: $e.m_backend.data.elems[$i],
+ size: $e.m_backend.prec_elem
+ ) : [$e,u]
+ )
+ )
+}
+
+
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk