[lisplab-devel] Mac OS X
Jørn Inge Vestgården
jivestgarden at gmail.com
Sun Feb 21 10:04:52 UTC 2010
Hello
This answer just applies too the reverse issue:
There is not yet a reverse in lisplab. It can rather easily be
implemented just as you say, by calling reverse on the underlaying
vector, but you must at the same time make a new vector. (I avoid
destructive operations as much as possible) E.g., look at the
implementation of copy. Reverse will be almost the same.
About subclassing sequence: it would be good for the functionality, as
you mention, but it is to my knowledge not possible in ansi cl
(Lisplab is ansi cl, except from some uses of sb-ext:truly-the. The
only reason the manual says that it runs only on sbcl is that I have
never tried it on anything else. To run it on other lisps, the only
change is to build with other Matlisp blas/lapack interfaces).
Subclassing sequence would also most probably be slow, since only
simple vectors and arrays are fast in SBCL (I do not understand why,
but the word simple usually speeds up with a factor 10).
Jørn Inge
2010/2/19 Adam Higuera <ahig321 at gmail.com>:
> Thanks. Did you get your fftw3 from macports, by the way?
>
> sudo port install fftw-3 kept erroring off with a failed checksum, so I just
> built from source from fftw.org, and got .a's and .la's instead of .dylibs.
> How did you build the .dylibs (kind of OT for the mailing list, I know -
> especially since I now have lisplab working)?
>
> There are actually symlinks to BLAS and LAPACK that OS X puts into
> /usr/lib/, presumably these would change to point to newer versions if Apple
> updated vecLib.
>
> Also, do you know a good way to reverse a row/column vector? cl-user
> doesn't seem to know about any of the accesor methods so I can't just (setf
> (matrix-store a) (reverse (matrix-store a))) at the top level. I would be
> interested in implementing this functionality (vector-reverse ?) if there's
> no good way already.
>
> Actually, in SBCL it is possible to subclass sequence, so that maybe a
> vector-dge could be implemented that would behave just like primitive lisp
> vectors as regards reverse, map, reduce etc, which I think would be a little
> less crufty although probably a PITA to implement and SBCL-specific (which
> lisplab is anyways).
>
> -Adam Higuera
>
> On Fri, Feb 19, 2010 at 5:59 AM, Knut Skogstrand Gjerden
> <knut.gjerden at ntnu.no> wrote:
>>
>> Pong!
>>
>> Sure, it is quite easy (at least if you run SBCL). To link against Apple's
>> blas and lapack, you can put
>>
>> (defvar *lisplab-libblas-path*
>> #P"/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib");
>> "Path to BLAS shared object file.")
>> (defvar *lisplab-liblapack-path*
>> #P"/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib");
>> "Path to LAPACK shared object file.")
>> (defvar *lisplab-libfftw-path* #P"/opt/local/lib/libfftw3.dylib"); "Path
>> to FFTW 3 shared object file.")
>> (defvar *lisplab-libfftw-threads-path*
>> #P"/opt/local/lib/libfftw3_threads.dylib"); "Path to FFTW 3 thread extension
>> shared object file.")
>>
>> at the top of lisplab.asd. These addresses should be standard on any Mac,
>> so you can just copy-paste, but check if your fftw-library is installed
>> under /opt or /usr.
>>
>> Then, all you have to do (in SBCL) is to (require 'lisplab) and you are
>> good to go. I usually do this in my .sbclrc-file because I am lazy, but you
>> can do it anywhere in your lisp. If your lisp is not SBCL, you have to do
>> some (asdf load-op ...)-stuff instead, which I do not remember because I
>> never do it.
>>
>> Knut
>>
>>
>> On 18. Feb, 2010, at 5:08 PM, Adam Higuera wrote:
>>
>> > Just pinging the list to see if anyone has had any success building
>> > lisplab on Mac OS X.
>> >
>> > In particular would someone more knowledgeable than me like to explain
>> > what to do about *lisp-blas-path* etc if I want to link against Apple's
>> > Accelerate framework?
>> > _______________________________________________
>> > lisplab-devel mailing list
>> > lisplab-devel at common-lisp.net
>> > http://common-lisp.net/cgi-bin/mailman/listinfo/lisplab-devel
>>
>
>
> _______________________________________________
> lisplab-devel mailing list
> lisplab-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/lisplab-devel
>
>
More information about the lisplab-devel
mailing list