You can get access to the loop variables for the "active dims" in your
PP subroutine -- those are the dims that you declare in the signature
at the top of the function. Inside a loop(<var>) %{ %} construct, the
name of the dim is available as a local C variable, as in:
/* xvals-like threadlooop */
loop(n) %{
$var() = n;
%}
Does that help?
On Nov 17, 2009, at 12:57 AM, adithya wrote:
> Hi All,
>
> How can i get address for a row (column in PDL's case) from PDL::PP??
>
> For Example, the following C code
> int a[10][10];
> getdata(a);
> int *row=a[5];
> row should contain the address of the 5th row.
>
> This brings up two questions:
>
> In PDL::PP module, can this be done???
> Can Slices be used inside PP code??
>
> Also, is there a way for OtherPars to be made Global Variables (like
> OtherPars => 'global static int T;')??
>
> Thanks in advance.
>
> Addy
>
> _______________________________________________
> Perldl mailing list
> [email protected]
> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
>
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl