On Sat, Feb 04, 2017 at 01:50:12PM -0600, Luis Mochan wrote: > On Sat, Feb 04, 2017 at 02:17:44PM -0500, Chris Marshall wrote: > > I think $P(a) != $P(b) will work. It did work, in a way.
What I now don't understand is the use of inplace. My routine has two outputs (one of them an integer pdl). If I now call it as ($y, $i)=f($x); it recognizes that $x is a different pdl than the output and copies the data before calling the fortran routine. I can also call the routine as f($x, $y=PDL->null, $i=PDL->null); with the same result. If I call it as $y=$x; f($y,$y, $i=PDL->null); it recognizes that the expected output $y and the input are the same pdl and calls the fortran routine without copying, producing the correct result. However, if I call it as $y=$x; $i=f($y->inplace); I get a segmentation fault, and if I call it as $y=$x; f($y->inplace, $i->PDL->null); I get a remainder the f expects three arguments, not two. I did have in my pp_def the line Inplace0>['x','y']. Is it that inplace is designed for one output routines only, or am I making something wrong? For the time being, I guess I'll pass only the input arguments (without using inplace) or all input and output arguments. Best regards, Luis > > > > It would probably work with $PDL(a) == $PDL(b) as well but I don't know. > > > > A quick test should answer the question. I'm hoping Craig or > > another PDL::PP expert can weigh in from their experience and > > expertise. > Thanks, I'll test these solutions. > Regards, > Luis > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > pdl-general mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/pdl-general > -- o W. Luis Mochán, | tel:(52)(777)329-1734 /<(*) Instituto de Ciencias Físicas, UNAM | fax:(52)(777)317-5388 `>/ /\ Apdo. Postal 48-3, 62251 | (*)/\/ \ Cuernavaca, Morelos, México | [email protected] /\_/\__/ GPG: 791EB9EB, C949 3F81 6D9B 1191 9A16 C2DF 5F0A C52B 791E B9EB ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ pdl-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pdl-general
