Open coding coercion to (complex double-float) not implemented.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Wishlist
|
Unassigned |
Bug Description
The compiler complains that it is unable to open code the coercion from a double-float to a complex double-float in the following
(defun copy-to/slow (output input)
(declare (type (simple-array (complex double-float) (*)) output)
(type (simple-array double-float (*)) input)
(dotimes (i (length output))
(setf (aref output i) (coerce (aref input i)
output)
As a result, the function COPY-TO/SLOW conses substantially.
If the coercion is replaced with (COMPLEX (AREF INPUT I)), it does not complain
(defun copy-to/fast (output input)
(declare (type (simple-array (complex double-float) (*)) output)
(type (simple-array double-float (*)) input)
(dotimes (i (length output))
(setf (aref output i) (complex (aref input i))))
output)
This function performs no consing as expected.
description: | updated |
description: | updated |
description: | updated |
Changed in sbcl: | |
assignee: | nobody → Stas Boukarev (stassats) |
importance: | Undecided → Wishlist |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
In aab5bd0d43016a5 2b5cf0df34885f0 d97b03a804, both produce the same code.