
Vector arguments to external procedures
wrote
Quote:
> However, as far as I can tell, the code that translates arguments for
> external procedures is buried deep and I can't see how I can increment
> the address of a vector before it is passed out.
I wonder if sysFIELD/sysUFIELD (defined in REF VMCODE does what you
want).
It says
For external accessing of structure or array components, the
mode argument may also specify that an external pointer to the
component should be returned rather than its value.
The mode argument presumably has the same definition as for cons_access
I have never used any of this stuff myself, but I was curious to know
whether what you wanted could be done without descending to the level
of writing syspop11 code.
http://www.cs.bham.ac.uk/research/poplog/sysdoc/syspop11
That could be the last resort, I suppose.
Quote:
> I realise that I can always provide an intermediate external routine
> that takes an address and an offset and adds them before calling the
> real routine. However, that's a pain as it has to be done for every
> external routine I want to call, and it would be much handier to have
> something that did it in Pop-11.
The 'last resort' mentioned above would do it in syspop11, then add a
new syntax form to invoke the mechanism. That would be easier than
having go via an intermediate external routine for every call.
Quote:
> PS I've been writing an interface to Lapack/BLAS in case you wonder why
> I want this.
Just out of curiosity, does that offer facilities that are different
from GSL -- the Gnu Scientific library:
http://sources.redhat.com/gsl/ref/gsl-ref_toc.html
which also mentions BLAS?
Aaron