Re: [Chicken-users] atlas-lapack egg release 1.0

2007-03-11 Thread felix winkelmann

On 3/11/07, Ivan Raikov <[EMAIL PROTECTED]> wrote:


Hi all,

I have created Chicken Scheme bindings for the ATLAS-LAPACK
library. The ATLAS project (Automatically Tuned Linear Algebra
Software) is an effort to implement linear algebra routines that are
optimized to take advantage of SIMD architectures such as SSE and
AltiVec, and it includes portable optimized implementations of all
routines in the BLAS library, and of a small subset of the LAPACK
library.

The atlas-lapack egg provides an interface to those LAPACK
routines that have been implemented by the ATLAS project. It is
available in the eggs SVN repository
.
Could someone upload the egg to the web page, please?

Also, in the next few days I will probably create bindings for some
more matrix factorization routines in LAPACK, and hopefully eventually
there will be a lapack egg (or eggs) to provide bindings for the
entire library.


Egg is uploaded. Thanks, Ivan!


cheers,
felix


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] easyffi default arguments

2007-03-11 Thread felix winkelmann

On 3/12/07, Carlos Pita <[EMAIL PROTECTED]> wrote:

Hi,

continuing with the easyffi saga :) I would like to hear your
suggestions about the best way to get c++ default args. One alternative
would be to rename the original method using ___declare(rename...)
directive, and then define a tinyclos method with an #!optional clause
that just delegates to the renamed method. I think it would be better to
directly invoke the underlying foreign-lambda to avoid the
generic->generic->foreign-lambda invocation chain which would incur into
possibly expensive method resolution twice. But I don't know how to
reference this hipotetical foreign-lambda (maybe an stub with a criptic
name that keeps no resemblance to the original one). Btw, is there any
way to inspect the macroexpanded ffi-level output of the #> <# sections
so I can tweak with more confidence?



Compile with "-debug F" to see the generated code.


cheers,
felix


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] easyffi default arguments

2007-03-11 Thread Carlos Pita
Hi,

continuing with the easyffi saga :) I would like to hear your
suggestions about the best way to get c++ default args. One alternative
would be to rename the original method using ___declare(rename...)
directive, and then define a tinyclos method with an #!optional clause
that just delegates to the renamed method. I think it would be better to
directly invoke the underlying foreign-lambda to avoid the
generic->generic->foreign-lambda invocation chain which would incur into
possibly expensive method resolution twice. But I don't know how to
reference this hipotetical foreign-lambda (maybe an stub with a criptic
name that keeps no resemblance to the original one). Btw, is there any
way to inspect the macroexpanded ffi-level output of the #> <# sections
so I can tweak with more confidence? 

Cheers,
Carlos






__ 
Preguntá. Respondé. Descubrí. 
Todo lo que querías saber, y lo que ni imaginabas, 
está en Yahoo! Respuestas (Beta). 
¡Probalo ya! 
http://www.yahoo.com.ar/respuestas 




___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] easyffi virtual=0 methods

2007-03-11 Thread Carlos Pita
I was thinking a bit more about this and concluded that it wouldn't be
possible to derive from an abstract C++ class in tinyclos anyway
(because of the impossibility of constructing an instance of that class
from anywhere but a subclass C++ constructor). So I decided to subclass
the problematic class from C++ providing default dummy implementations
for the abstract methods. Now I must call the (non-default) constructor
of the subclass and I'm having trouble with the easyffi parser for the
syntax: ctor(...) : base-ctor(..) {}. One thing I can do to solve this
is to put the definition inside a #> <# block and the declaration inside
a #>? <# block (instead of putting the definition once in-between #>!
<#). But in any case, the easyffi documentation in
http://galinha.ucpel.tche.br:8080//easyffi#foreign-include-path states
that the grammar supports calling base constructors:

CONSTRUCTOR = ["___callback" | "___safe"] ["explicit"] ID "(" ARGTYPE
"," ... ")" [BASECONSTRUCTORS] [CODE]

Specifically, the problematic line is:

  ScmStkFrames( unsigned int nFrames, unsigned int nChannels, bool
interleaved ) : StkFrames(nFrames, nChannels, interleaved) {}

And the reported error is:

Error: during expansion of (foreign-parse ...) - unexpected tokens: ((op
":") (id "StkFrames") open-paren (id "nFrames") comma (id "nChannels")
comma (id "interleaved") close-paren (scope))

Cheers!,
Carlos


On Sun, 2007-03-11 at 17:11 -0300, Carlos Pita wrote:
> Hi all,
> 
> suppose I have a C++ class FM with some pure/abstract/virtual=0 (you
> choose) methods that I want to expose to chicken via easyffi. This class
> has a constructor, to be used by its concrete subclasses (and I'm not
> the owner of the code, so avoiding ctors in abstract classes is a nono).
> The trouble is that even if I mark the class as ___abstract, easyffi is
> trying to instantiate it someway, so I get an error report from the g++
> compiler, something like:
> 
> /site/install/stk-4.2.1/include/FM.h:36: note:   because the following
> virtual functions are pure within ‘FM’:
> /site/install/stk-4.2.1/include/Instrmnt.h:27: note:virtual void
> Instrmnt::noteOn(StkFloat, StkFloat)
> /site/install/stk-4.2.1/include/FM.h:88: note:  virtual StkFloat
> FM::computeSample()
> *** Shell command terminated with exit status 1: g++ fmscm.cpp -o
> fmscm.o -c -DHAVE_CHICKEN_CONFIG_H -Os -fomit-frame-pointer
> -fno-strict-aliasing -Wall -Wno-unused -Wno-uninitialized
> -DC_ENABLE_PTABLES -DC_NO_PIC_NO_DLL
> -I /data1/install/chicken-2.518/include/
> -I/site/install/stk-4.2.1/include
> 
> I could comment out the ctor and then things go fine, but I lose the
> chance to invoke this ctor from tinyclos concrete subclasses... don't I?
> 
> Can you help me?
> 
> Thank you in advance.
> Regards,
> Carlos
> 
> 
> 
>   
> 
>   
>   
> __ 
> Pregunt. Respond. Descubr. 
> Todo lo que queras saber, y lo que ni imaginabas, 
> est en Yahoo! Respuestas (Beta). 
> Probalo ya! 
> http://www.yahoo.com.ar/respuestas 
> 
> 
> 
> 
> ___
> Chicken-users mailing list
> Chicken-users@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/chicken-users






__ 
Pregunt�. Respond�. Descubr�. 
Todo lo que quer�as saber, y lo que ni imaginabas, 
est� en Yahoo! Respuestas (Beta). 
�Probalo ya! 
http://www.yahoo.com.ar/respuestas 




___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] atlas-lapack egg release 1.0

2007-03-11 Thread Ivan Raikov

Hi all,

I have created Chicken Scheme bindings for the ATLAS-LAPACK
library. The ATLAS project (Automatically Tuned Linear Algebra
Software) is an effort to implement linear algebra routines that are
optimized to take advantage of SIMD architectures such as SSE and
AltiVec, and it includes portable optimized implementations of all
routines in the BLAS library, and of a small subset of the LAPACK
library.

The atlas-lapack egg provides an interface to those LAPACK
routines that have been implemented by the ATLAS project. It is
available in the eggs SVN repository
.
Could someone upload the egg to the web page, please?

Also, in the next few days I will probably create bindings for some
more matrix factorization routines in LAPACK, and hopefully eventually
there will be a lapack egg (or eggs) to provide bindings for the
entire library.


-Ivan



___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] easyffi virtual=0 methods

2007-03-11 Thread Carlos Pita
Hi all,

suppose I have a C++ class FM with some pure/abstract/virtual=0 (you
choose) methods that I want to expose to chicken via easyffi. This class
has a constructor, to be used by its concrete subclasses (and I'm not
the owner of the code, so avoiding ctors in abstract classes is a nono).
The trouble is that even if I mark the class as ___abstract, easyffi is
trying to instantiate it someway, so I get an error report from the g++
compiler, something like:

/site/install/stk-4.2.1/include/FM.h:36: note:   because the following
virtual functions are pure within ‘FM’:
/site/install/stk-4.2.1/include/Instrmnt.h:27: note:virtual void
Instrmnt::noteOn(StkFloat, StkFloat)
/site/install/stk-4.2.1/include/FM.h:88: note:  virtual StkFloat
FM::computeSample()
*** Shell command terminated with exit status 1: g++ fmscm.cpp -o
fmscm.o -c -DHAVE_CHICKEN_CONFIG_H -Os -fomit-frame-pointer
-fno-strict-aliasing -Wall -Wno-unused -Wno-uninitialized
-DC_ENABLE_PTABLES -DC_NO_PIC_NO_DLL
-I /data1/install/chicken-2.518/include/
-I/site/install/stk-4.2.1/include

I could comment out the ctor and then things go fine, but I lose the
chance to invoke this ctor from tinyclos concrete subclasses... don't I?

Can you help me?

Thank you in advance.
Regards,
Carlos







__ 
Pregunt�. Respond�. Descubr�. 
Todo lo que quer�as saber, y lo que ni imaginabas, 
est� en Yahoo! Respuestas (Beta). 
�Probalo ya! 
http://www.yahoo.com.ar/respuestas 




___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users