Pass complex scalars to GSL functions
By sending the two parts of a complex as separate doubles (complex double-float), or packing the two parts into a one double-float argument (complex single-float), it is possible to pass complex numbers in GSL function calls. This is very likely to be non-portable, so a test is conducted and the results in *pass-complex-scalar-as-two-reals* determine whether defmfun does this translation or just creates a function that signals an error. The complex tests have been modified so that no longer expect an error: SBCL 64: TOTAL: 1223 assertions passed, 5 failed, 0 execution errors. CCL 64: TOTAL: 1228 assertions passed, 0 failed, 0 execution errors. This also works in 32 bit SBCL.
Showing
- complex.lisp 42 additions, 0 deletionscomplex.lisp
- floating-point/floating-point.lisp 4 additions, 2 deletionsfloating-point/floating-point.lisp
- gsll.asd 5 additions, 3 deletionsgsll.asd
- init/complex-types.lisp 92 additions, 0 deletionsinit/complex-types.lisp
- init/defmfun-single.lisp 45 additions, 47 deletionsinit/defmfun-single.lisp
- init/element-types.lisp 1 addition, 270 deletionsinit/element-types.lisp
- init/number-conversion.lisp 2 additions, 2 deletionsinit/number-conversion.lisp
- init/types.lisp 205 additions, 3 deletionsinit/types.lisp
- tests/axpy.lisp 52 additions, 52 deletionstests/axpy.lisp
- tests/inverse-matrix-product.lisp 61 additions, 57 deletionstests/inverse-matrix-product.lisp
- tests/matrix-product-hermitian.lisp 140 additions, 158 deletionstests/matrix-product-hermitian.lisp
- tests/matrix-product-triangular.lisp 62 additions, 59 deletionstests/matrix-product-triangular.lisp
- tests/matrix-product.lisp 136 additions, 146 deletionstests/matrix-product.lisp
- tests/scale.lisp 37 additions, 28 deletionstests/scale.lisp
complex.lisp
0 → 100644
init/complex-types.lisp
0 → 100644
This diff is collapsed.
Please register or sign in to comment