Which Lisp implementation
- Subject: Which Lisp implementation
- From: Camm Maguire
- Date: 18 Jul 2007 13:46:33 -0400
Greetings!
Please take a look at 2.7.0 in cvs head:
=============================================================================
COMPILER>(defdlfun (:double "cblas_ddot" "libblas.so") :int :double* :int :double* :int)
|libblas|:|cblas_ddot|
COMPILER>(compile *)
;; Compiling /tmp/gazonk_18484_0.lsp.
;; End of Pass 1.
;; End of Pass 2.
;; OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0, Speed=3, (Debug quality ignored)
;; Finished compiling /tmp/gazonk_18484_0.o.
;; Loading /tmp/gazonk_18484_0.o
;; start address -T 0xacca40 ;; Finished loading /tmp/gazonk_18484_0.o
#<compiled-function |libblas|:|cblas_ddot|>
NIL
NIL
COMPILER>(defun foo (x y) (declare ((vector long-float) x) (seqind y)) (|libblas|:|cblas_ddot| y x 1 x 1))
FOO
COMPILER>(compile *)
;; Compiling /tmp/gazonk_18484_0.lsp.
;; End of Pass 1.
;; End of Pass 2.
;; OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0, Speed=3, (Debug quality ignored)
;; Finished compiling /tmp/gazonk_18484_0.o.
;; Loading /tmp/gazonk_18484_0.o
;; start address -T 0xc05d38 ;; Finished loading /tmp/gazonk_18484_0.o
#<compiled-function FOO>
NIL
NIL
COMPILER>(let ((x (coerce '( 1.0 2.0 3.0) '(vector long-float)))) (foo x (length x)))
14.0
COMPILER>(disassemble 'foo nil)
;; Compiling /tmp/gazonk_18484_0.lsp.
;; End of Pass 1.
;; End of Pass 2.
;; OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0, Speed=3, (Debug quality ignored)
;; Finished compiling /tmp/gazonk_18484_0.o.
#include "gazonk_18484_0.h"
void init_code(){do_init((void *)VV);}
/* local entry for function FOO */
static double LI1__FOO___gazonk_18484_0(V3,V4)
object V3;fixnum V4;
{ VMB1 VMS1 VMV1
goto TTL;
TTL:;
{double V5 = ((double(*)(int,double*,int,double*,int))dlcblas_ddot)(V4,(double*)(V3)->v.v_self,(fixnum)1,(double*)(V3)->v.v_self,(fixnum)1);VMR1
(V5);}
}
/* global entry for the function FOO */
static void L1__FOO___gazonk_18484_0()
{ register object *base=vs_base;
base[0]=make_longfloat(LI1__FOO___gazonk_18484_0((base[0]),fix(base[1])));
vs_top=(vs_base=base)+1;
}
NIL
COMPILER>(let ((x (coerce '( 1.0 2.0 3.0) '(vector long-float)))) (|libblas|:|cblas_ddot| (length x) x 1 x 1))
14.0
COMPILER>(disassemble '|libblas|:|cblas_ddot| nil)
;; Compiling /tmp/gazonk_18484_0.lsp.
;; End of Pass 1.
;; End of Pass 2.
;; OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0, Speed=3, (Debug quality ignored)
;; Finished compiling /tmp/gazonk_18484_0.o.
#include "gazonk_18484_0.h"
void init_code(){do_init((void *)VV);}
/* local entry for function cblas_ddot */
static object LI1__cblas_ddot___gazonk_18484_0(V6,V7,V8,V9,V10)
register object V6;register object V7;register object V8;register object V9;register object V10;
{ VMB1 VMS1 VMV1
goto TTL;
TTL:;
if(!(type_of((V10))==t_fixnum)){
goto T5;}
goto T3;
goto T5;
T5:;
V10= (VFUN_NARGS=4,(/* CHECK-TYPE-SYMBOL */(*LnkLI12)(((object)VV[0]),(V10),((object)VV[1]),Cnil)));
goto T3;
T3:;
if(((VFUN_NARGS=2,(/* TYPEP */(*LnkLI13)((V9),((object)VV[2])))))==Cnil){
goto T11;}
goto T9;
goto T11;
T11:;
V9= (VFUN_NARGS=4,(/* CHECK-TYPE-SYMBOL */(*LnkLI12)(((object)VV[3]),(V9),((object)VV[2]),Cnil)));
goto T9;
T9:;
if(!(type_of((V8))==t_fixnum)){
goto T17;}
goto T15;
goto T17;
T17:;
V8= (VFUN_NARGS=4,(/* CHECK-TYPE-SYMBOL */(*LnkLI12)(((object)VV[4]),(V8),((object)VV[1]),Cnil)));
goto T15;
T15:;
if(((VFUN_NARGS=2,(/* TYPEP */(*LnkLI13)((V7),((object)VV[2])))))==Cnil){
goto T23;}
goto T21;
goto T23;
T23:;
V7= (VFUN_NARGS=4,(/* CHECK-TYPE-SYMBOL */(*LnkLI12)(((object)VV[5]),(V7),((object)VV[2]),Cnil)));
goto T21;
T21:;
if(!(type_of((V6))==t_fixnum)){
goto T29;}
goto T27;
goto T29;
T29:;
V6= (VFUN_NARGS=4,(/* CHECK-TYPE-SYMBOL */(*LnkLI12)(((object)VV[6]),(V6),((object)VV[1]),Cnil)));
goto T27;
T27:;
{fixnum V11;
fixnum V13;
fixnum V15;
V11= fixint((V10));
V13= fixint((V8));
V15= fixint((V6));
V16= (/* SYMBOL-VALUE */(*LnkLI14)(((object)VV[9])));
{object V17 = make_longfloat(((double(*)(int,double*,int,double*,int))(((fixnum)object_to_fixnum(/* INLINE-ARGS */V16))))((int)(V15),(V7)->lfa.lfa_self,(int)(V13),(V9)->lfa.lfa_self,(int)(V11)));VMR1
(V17);}}
return Cnil;
}
NIL
COMPILER>
=============================================================================
Take care,
Nicolas Neuss <neuss at mathematik.uni-karlsruhe.de> writes:
> Reinhard Oldenburg <oldenburg at ph-heidelberg.de> writes:
>
> > It seems that currently there is no Lisp that satisfies my needs:
> > 1) windows platform
> > 2) free (I want to produce a freeware application)
> > 3) runs Maxima
> > 4) has cffi
> > 5) has testet support of a standard gui library (qt, gtk, wx, fltk)
> > 6) fast
> >
> > cmucl fails at 1
> > gcl fails at 4
> > sbcl fails at 3,5
>
> Are you sure about 3? IIRC, I have run Maxima with SBCL.
>
> Yours, Nicolas
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
>
>
--
Camm Maguire camm at enhanced.com
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah