Skip to content
Commit d161eff7 authored by Raymond Toy's avatar Raymond Toy
Browse files

First cut at adding a 3-arg versions of the basic operations to reduce

consing by allowing the third argument to be a place where the result
can be stored.  This is intended to help reduce allocation and gc
costs for Lisps that use arrays to represent quad-doubles.

More work is needed to make the compiler macros do the right thing for
CMUCL.

qd-rep.lisp:
o Add %STORE-QD-D to store a quad-double into a place.  For CMUCL,
  there place argument is ignored and a fresh quad-double is created.

qd.lisp:
o Modify ADD-QD, SUB-QD, MUL-QD, and DIV-QD to take an optional third
  argument indicating where the result can be stored.   Ignored on
  CMUCL.
o Add ADD-QD-T, SUB-QD-T, MUL-QD-T, and DIV-QD-T, which are 3-arg
  functions with the third arg always required which is the storage
  area to hold the result.  Ignored on CMUCL.
o Add compiler macros to convert ADD-QD and friends to ADD-QD-T if the
  third arg is always given.  The effect is, essentially, inlining
  ADD-QD.
parent a9222847
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment