[Libre-soc-bugs] [Bug 1044] SVP64 implementation of pow(x,y,z)

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Sat Oct 7 04:40:14 BST 2023


https://bugs.libre-soc.org/show_bug.cgi?id=1044

--- Comment #33 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Jacob Lifshay from comment #32)

>     add WIP knuth algorithm D python implementation

nice. clear.

   362    if qhat * vn[n - 2] > (rhat << word_size) + un[j + n - 2]:

can use 1<<r3 on that, where r3=j, temporarily, rather than Indexed
REMAP. but really, Indexed REMAP is a necessity here.


   380             # subfe
   381             t += ~product[i] + un[j + i]

just sv.subfe! but you need Indexed REMAP on un[j+i]
and can replace it later with Bigmul (rhombic) REMAP.

it is quite ridiculous how small this algorithm will
end up being, esp. as the overflow condition you pre-designed
divmod2du to give that value

     352         if un[j + n] >= vn[n - 1]:
     353             # division overflows word


ultimately though this *is* going to need Vertical-First,
with the "svstep." notification, as the loops j and i are
nested.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-soc-bugs mailing list