probably ought to work, though I don't really know what happens when
you do something like "integer = integer * float" - I'm hoping I get
lucky and it just rounds off nicely =). I don't know if sin and cos
work that easily. There's also probably more to be added here
(setting other values to zero, perhaps), but this is a start.
You probably want to use a ceil or floor around your integer*float
calculations so the code behaves
well on different architectures etc. Otherwise you can get
unanticipated differences of one pixel..
Then you need to include the math library on compilation -lm
However, I'm having trouble with the Makefile. When I try to run it,
I get the following error:
Unable to determine UNINSTALLED directory path to PDL::Core::Dev module
but my path to Dev.pm is /usr/local/lib/perl/5.8.8/PDL/Core/Dev.pm .
Was there something I was supposed to do at install time to get this
working that I left out?
Not sure what your Makefile.PL looks like so that is hard to say, did
you use the one given by Xavier Calbet (great work btw. Xavier!) at:
http://wiki.jach.hawaii.edu/pdl_wiki-bin/wiki/
How_to_call_C_functions_from_PDL
I tend to use variations on the following theme, but I'd recommend
instead adopting Xavier's Makefile.PL.
use PDL::Core::Dev; # Pick up development utilities
use ExtUtils::MakeMaker;
use Config;
$package = ["mymath.pd",MyMath,PDL::MyMath];
WriteMakefile(
'NAME' => 'PDL::MyMath',
'CCFLAGS' => "$define_bool -g",
'VERSION_FROM' => 'mymath.pd',
'TYPEMAPS' => [&PDL_TYPEMAP()],
'OBJECT' => 'MyMath.o ',
'PM' => {
'MyMath.pm' => '$(INST_LIBDIR)/MyMath.pm'
},
'INC' => &PDL_INCLUDE(),
'LIBS' => ["-lm"],
'clean' => {'FILES' =>
'MyMath.pm MyMath.xs MyMath.o MyMath.c'},
'dist' => { COMPRESS => 'gzip', SUFFIX => 'gz' },
);
sub MY::postamble { pdlpp_postamble($package); }
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl