Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

build swig wrappers for different versions of GSL (1.11 - 1.15)

  • Loading branch information...
commit 6b1150c571527d16d1e4853614b7ae0343553d83 1 parent 298e0db
@tadam tadam authored
Showing with 289 additions and 70 deletions.
  1. +3 −0  .gitignore
  2. +18 −16 Build.PL
  3. +2 −0  MANIFEST.SKIP
  4. +1 −1  README
  5. +105 −43 inc/GSLBuilder.pm
  6. +41 −0 inc/ver2func
  7. +47 −0 pod/Diff.pod
  8. +1 −0  swig/BLAS.i
  9. +1 −0  swig/BSpline.i
  10. +1 −0  swig/CBLAS.i
  11. +2 −0  swig/CDF.i
  12. +2 −0  swig/Chebyshev.i
  13. +2 −0  swig/Combination.i
  14. +2 −0  swig/Complex.i
  15. +1 −0  swig/Const.i
  16. +1 −0  swig/DHT.i
  17. +1 −0  swig/Deriv.i
  18. +2 −10 swig/Diff.i
  19. +2 −0  swig/Eigen.i
  20. +2 −0  swig/Errno.i
  21. +2 −0  swig/FFT.i
  22. +1 −0  swig/Fit.i
  23. +1 −0  swig/Heapsort.i
  24. +1 −0  swig/Histogram.i
  25. +1 −0  swig/Histogram2D.i
  26. +2 −0  swig/IEEEUtils.i
  27. +1 −0  swig/Integration.i
  28. +1 −0  swig/Interp.i
  29. +1 −0  swig/Linalg.i
  30. +1 −0  swig/Machine.i
  31. +2 −0  swig/Matrix.i
  32. +2 −0  swig/MatrixComplex.i
  33. +2 −0  swig/Min.i
  34. +1 −0  swig/Monte.i
  35. +2 −0  swig/Multifit.i
  36. +2 −0  swig/Multimin.i
  37. +1 −0  swig/Multiroots.i
  38. +1 −0  swig/NTuple.i
  39. +2 −0  swig/ODEIV.i
  40. +1 −0  swig/Permutation.i
  41. +1 −0  swig/Poly.i
  42. +2 −0  swig/PowInt.i
  43. +1 −0  swig/QRNG.i
  44. +2 −0  swig/RNG.i
  45. +1 −0  swig/Randist.i
  46. +2 −0  swig/Roots.i
  47. +1 −0  swig/SF.i
  48. +2 −0  swig/Siman.i
  49. +1 −0  swig/Sort.i
  50. +2 −0  swig/Spline.i
  51. +1 −0  swig/Statistics.i
  52. +1 −0  swig/Sum.i
  53. +2 −0  swig/Sys.i
  54. +1 −0  swig/Vector.i
  55. +1 −0  swig/VectorComplex.i
  56. +2 −0  swig/Wavelet.i
  57. +1 −0  swig/Wavelet2D.i
View
3  .gitignore
@@ -1,3 +1,5 @@
+*~
+pm
.gitignore
*.core
core
@@ -16,6 +18,7 @@ foo*
tags
.DS_Store
xs/*_wrap.c
+swig/renames.i
swig/system.i
.prove
Math-GSL-*/
View
34 Build.PL
@@ -77,7 +77,7 @@ sub try_compile {
my $errno = $? >> 8;
local $! = $errno;
print "
-
+
*** The test compile of '$tmp.c' failed: status $?
*** (the status means: errno = $errno or '$!')
*** DO NOT PANIC: this just means that you may get some innocuous
@@ -101,26 +101,28 @@ sub try_cflags ($) {
}
print "no\n";
return '';
-
+
}
print "Checking for GSL..";
my %gsl_pkgcfg = ExtUtils::PkgConfig->find ('gsl');
-my $MIN_GSL_VERSION = "1.8";
+my $MIN_GSL_VERSION = "1.11";
my $gv = $gsl_pkgcfg{'modversion'};
my $current_minor_version;
my $path_system = File::Spec->catfile('swig', 'system.i');
open my $fh, ">", "$path_system" or die "Could not create system.i : $!";
+my $current_version;
if (defined $gv) {
if ($gv =~ m{\A(\d+(?:\.\d+)+)}) {
- my @current= split /\./, $1;
+ $current_version = $1;
+ my @current = split /\./, $current_version;
print $fh "#define GSL_MAJOR_VERSION $current[0]\n";
print $fh "#define GSL_MINOR_VERSION $current[1]\n";
- my @min= split /\./, $MIN_GSL_VERSION;
+ my @min = split /\./, $MIN_GSL_VERSION;
$current_minor_version = $current[1];
unless ($current[0] >= $min[0] && $current[1] >= $min[1]) {
printf "
@@ -130,7 +132,6 @@ if (defined $gv) {
exit 1;
} else {
print "Found GSL version $gv\n";
-
}
} else {
print "
@@ -187,21 +188,19 @@ if ($Config{archname} =~ /x86_64|amd64/ ) {
my @Subsystems = grep { ! /^Test$/ } GSLBuilder::subsystems;
-# BSplines appeared in 1.9
-if ($current_minor_version < 9 ) {
- @Subsystems = grep { ! /BSpline/ } @Subsystems;
-}
my $cleanup = qq{
- xs/*_wrap.c core *.core swig/system.i
- swig/*.o Makefile Math-GSL-* tmp* pod2ht*.tmp _build
- lib/Math/GSL/[A-z]+/* blib *.so *.orig
+ xs/*_wrap*.c core *.core swig/system.i swig/renames.i
+ swig/*.o Makefile Math-GSL-* tmp* pod2ht*.tmp _build pm
+ lib/Math/GSL/[A-z]+/* blib *.so *.orig
} . join " ", map { catfile( (qw( lib Math GSL ), "$_.pm") ) } @Subsystems;
if ($^O ne 'darwin') {
$ldflags = '-shared ' . $ldflags;
}
-my $builder = GSLBuilder->new(
+my $ver2func = do("inc/ver2func");
+
+my $builder = GSLBuilder->new(
module_name => 'Math::GSL',
add_to_cleanup => [ $cleanup ],
create_makefile_pl => 'passthrough',
@@ -211,7 +210,7 @@ my $builder = GSLBuilder->new(
include_dirs => [],
extra_linker_flags => $ldflags,
extra_compiler_flags=> "$ccflags " . ($ENV{CC_FLAGS}||''),
- swig_flags => $swig_flags,
+ swig_flags => $swig_flags,
license => 'gpl',
build_requires => {
'Test::Most' => 0,
@@ -229,9 +228,12 @@ my $builder = GSLBuilder->new(
'ExtUtils::PkgConfig' => '1.03',
},
swig_source => [
- map { [ "swig/$_.i", "pod/$_.pod" ] } @Subsystems ,
+ map { [ "swig/$_.i", ["pod/$_.pod"] ] } @Subsystems ,
],
+ ver2func => $ver2func,
+ current_version => $current_version,
);
$builder->add_build_element('swig');
+
$builder->create_build_script();
print "Have a great day!\n";
View
2  MANIFEST.SKIP
@@ -14,5 +14,7 @@ foo*
Math-GSL
\.prove
swig/system\.i
+swig/renames\.i
+.*~
^MYMETA.yml$
META.json
View
2  README
@@ -5,7 +5,7 @@ Scientific Library (GSL) is a numerical library for C and C++ programmers. It
is free software under the GNU General Public License. Math::GSL uses SWIG to
generate Perl bindings to *most* GSL functionality.
-Currently Math::GSL requires at least Perl 5.8 and GSL 1.8 to compile. SWIG
+Currently Math::GSL requires at least Perl 5.8 and GSL 1.11 to compile. SWIG
is only needed if you want help work on Math::GSL and checkout code from the
Math::GSL git repository.
View
148 inc/GSLBuilder.pm
@@ -1,15 +1,18 @@
package GSLBuilder;
+
+use strict;
+use warnings;
+
use Config;
use File::Copy;
use File::Path qw/mkpath/;
use File::Spec::Functions qw/:ALL/;
-use Data::Dumper;
use base 'Module::Build';
sub is_release {
return -e '.git' ? 0 : 1;
}
-sub subsystems {
+sub subsystems {
sort qw/
Diff Machine Statistics BLAS
Eigen Matrix Poly MatrixComplex
@@ -17,12 +20,12 @@ sub subsystems {
CBLAS FFT Min IEEEUtils
CDF Fit QRNG
Chebyshev Monte RNG Vector
- Heapsort Multifit Randist Roots
+ Heapsort Multifit Randist Roots
Combination Histogram Multimin Wavelet
Complex Histogram2D Multiroots Wavelet2D
Const Siman Sum Sys
- NTuple Integration Sort Test
- DHT Interp ODEIV SF
+ NTuple Integration Sort Test
+ DHT Interp ODEIV SF
Deriv Linalg Permutation Spline
/;
}
@@ -31,33 +34,55 @@ sub process_swig_files {
my $self = shift;
my $p = $self->{properties};
-
- return unless $p->{swig_source};
my $files_ref = $p->{swig_source};
+ return unless ($files_ref);
+
+ unless (is_release()) {
+ $self->process_versioned_swig_files;
+ }
foreach my $file (@$files_ref) {
- $self->process_swig($file->[0], $file->[1]);
+ $self->process_xs_file($file->[0]);
}
}
-# Check check dependencies for $main_swig_file. These are the
-# %includes. If needed, arrange to run swig on $main_swig_file to
-# produce a xxx_wrap.c C file.
+sub process_versioned_swig_files {
+ my $self = shift;
-sub process_swig {
- my ($self, $main_swig_file, $deps_ref) = @_;
- my ($cf, $p) = ($self->{config}, $self->{properties});
+ my $p = $self->{properties};
+ my $files_ref = $p->{swig_source};
+
+ my $cur_ver = $p->{current_version};
+ my $ver2func = $p->{ver2func};
+ foreach my $ver (sort {cmp_versions($a, $b)} keys %{$ver2func}) {
+ next if (cmp_versions($cur_ver, $ver) == -1);
+ my @renames;
+ foreach my $high_ver (keys %{$ver2func}) {
+ next if (cmp_versions($high_ver, $ver) < 1);
+ push @renames, @{$ver2func->{$high_ver}};
+ }
+ print "Building wrappers for GSL $ver\n";
+ open(my $fh, '>', 'swig/renames.i');
+ foreach my $rename (@renames) {
+ print $fh q{%rename("%(regex:/} . $rename . q{/$ignore/)s") "";} . "\n";
+ }
+ close($fh);
+
+ foreach my $file (@$files_ref) {
+ $self->process_swig($file->[0], $file->[1], $ver);
+ }
+ }
+ $self->add_to_cleanup('swig/renames.i');
+}
+
+sub process_xs_file {
+ my ($self, $main_swig_file) = @_;
+
+ my $ver = $self->{properties}->{current_version};
(my $file_base = $main_swig_file) =~ s/\.[^.]+$//;
$file_base =~ s!swig/!!g;
- my $c_file = catdir('xs',"${file_base}_wrap.c");
-
- my @deps = defined $deps_ref ? @$deps_ref : ();
+ my $c_file = catfile('xs',"${file_base}_wrap.$ver.c");
- # don't bother with swig if this is a CPAN release
- unless ( is_release() ) {
- $self->compile_swig($main_swig_file, $c_file)
- unless($self->up_to_date( [$main_swig_file, @deps],$c_file));
- }
# .c -> .o
my $obj_file = $self->compile_c($c_file);
$self->add_to_cleanup($obj_file);
@@ -67,11 +92,44 @@ sub process_swig {
# .o -> .so
$self->link_c($archdir, $file_base, $obj_file);
+
+ my $from = catfile(qw/pm Math GSL/, "${file_base}.pm.$ver");
+ my $to = catfile(qw/blib lib Math GSL/, "${file_base}.pm");
+ chmod 0644, $from, $to;
+ copy($from, $to);
+}
+
+sub cmp_versions {
+ my ($v1, $v2) = @_;
+ my @v1 = split(/\./, $v1);
+ my @v2 = split(/\./, $v2);
+ my $cmp_major = $v1[0] <=> $v2[0];
+ return $cmp_major if ($cmp_major != 0);
+ my $cmp_minor = $v1[1] <=> $v2[1];
+ return $cmp_minor;
+}
+
+# Check dependencies for $main_swig_file. These are the
+# %includes. If needed, arrange to run swig on $main_swig_file to
+# produce a xxx_wrap.c C file.
+sub process_swig {
+ my ($self, $main_swig_file, $deps_ref, $ver) = @_;
+ my ($cf, $p) = ($self->{config}, $self->{properties});
+
+ (my $file_base = $main_swig_file) =~ s/\.[^.]+$//;
+ $file_base =~ s!swig/!!g;
+ my $c_file = catfile('xs',"${file_base}_wrap.$ver.c");
+
+ my @deps = defined $deps_ref ? @$deps_ref : ();
+
+ # don't bother with swig if this is a CPAN release
+ $self->compile_swig($main_swig_file, $c_file, $ver)
+ unless($self->up_to_date([$main_swig_file, @deps], $c_file));
}
# Invoke swig with -perl -outdir and other options.
sub compile_swig {
- my ($self, $file, $c_file) = @_;
+ my ($self, $file, $c_file, $ver) = @_;
my ($cf, $p) = ($self->{config}, $self->{properties}); # For convenience
# File name, minus the suffix
@@ -81,26 +139,30 @@ sub compile_swig {
$file_base =~ s!swig/!!g;
my $pm_file = "${file_base}.pm";
-
+
my @swig = qw/swig/, defined($p->{swig}) ? ($self->split_like_shell($p->{swig})) : ();
my @swig_flags = defined($p->{swig_flags}) ? $self->split_like_shell($p->{swig_flags}) : ();
-
- my $blib_lib = catfile(qw/blib lib/);
- my $gsldir = catfile($blib_lib, qw/Math GSL/);
- mkdir $gsldir unless -e $gsldir;
-
+ my $blib_lib = catdir(qw/blib lib/);
+ my $gsldir = catdir('pm', qw/Math GSL/);
+ mkpath $gsldir unless -e $gsldir;
+
my $from = catfile($gsldir, $pm_file);
- my $to = catfile(qw/lib Math GSL/,$pm_file);
+ my $to = catfile(qw/lib Math GSL/, $pm_file);
chmod 0644, $from, $to;
$self->do_system(@swig, '-o', $c_file ,
- '-outdir', $gsldir,
+ '-outdir', $gsldir,
'-perl5', @swig_flags, $file)
or die "error : $! while building ( @swig_flags ) $c_file in $gsldir from '$file'";
- print "Copying from: $from, to: $to; it makes the CPAN indexer happy.\n";
- copy($from,$to);
- return $c_file;
+ move($from, "$from.$ver");
+
+ if ($p->{current_version} eq $ver) {
+ print "Copying from: $from.$ver, to: $to; it makes the CPAN indexer happy.\n";
+ copy("$from.$ver", $to);
+ }
+
+ return $c_file;
}
sub is_windows { $^O =~ /MSWin32/i }
sub is_darwin { $^O =~ /darwin/i }
@@ -116,34 +178,34 @@ sub link_c {
$self->add_to_cleanup($lib_file);
my $objects = $p->{objects} || [];
-
+
unless ($self->up_to_date([$obj_file, @$objects], $lib_file)) {
my @linker_flags = $self->split_like_shell($p->{extra_linker_flags});
push @linker_flags, $Config{archlib} . '/CORE/' . $Config{libperl} if (is_windows() or is_darwin());
- my @lddlflags = $self->split_like_shell($cf->{lddlflags});
+ my @lddlflags = $self->split_like_shell($cf->{lddlflags});
my @shrp = $self->split_like_shell($cf->{shrpenv});
my @ld = $self->split_like_shell($cf->{ld}) || "gcc";
# Strip binaries if we are compiling on windows
push @ld, "-s" if (is_windows() && $Config{cc} eq 'gcc');
- $self->do_system(@shrp, @ld, @lddlflags, @user_libs, '-o', $lib_file ,
+ $self->do_system(@shrp, @ld, @lddlflags, '-o', $lib_file,
$obj_file, @$objects, @linker_flags)
or die "error building $lib_file file from '$obj_file'";
}
-
+
return $lib_file;
}
-# From Base.pm but modified to put package cflags *after*
+# From Base.pm but modified to put package cflags *after*
# installed c flags so warning-removal will have an effect.
sub compile_c {
my ($self, $file) = @_;
my ($cf, $p) = ($self->{config}, $self->{properties}); # For convenience
-
+
# File name, minus the suffix
(my $file_base = $file) =~ s/\.[^.]+$//;
my $obj_file = $file_base . $Config{_o};
@@ -154,7 +216,7 @@ sub compile_c {
$cf->{installarchlib} = $Config{archlib};
- my @include_dirs = @{$p->{include_dirs}}
+ my @include_dirs = @{$p->{include_dirs}}
? map {"-I$_"} (@{$p->{include_dirs}}, catdir($cf->{installarchlib}, 'CORE'))
: map {"-I$_"} ( catdir($cf->{installarchlib}, 'CORE') ) ;
@@ -175,10 +237,10 @@ sub compile_c {
# it can be added back via @extra_compiler_flags.
my @flags = (@include_dirs, @cccdlflags, '-c', @ccflags, @extra_compiler_flags, );
-
+
my @cc = $self->split_like_shell($cf->{cc});
@cc = "gcc" unless @cc;
-
+
$self->do_system(@cc, @flags, '-o', $obj_file, $file)
or die "error building $Config{_o} file from '$file'";
View
41 inc/ver2func
@@ -0,0 +1,41 @@
+{
+# "1.8" => [],
+# "1.9" => [],
+# "1.10" => [],
+ "1.11" => [],
+ "1.12" => [qw/
+ ^gsl_linalg_cholesky_invert$
+ ^gsl_matrix_complex_isnonneg$
+ ^gsl_multimin_fminimizer_nmsimplex2.*
+ ^gsl_sf_exprel_n_CF_e$
+ ^gsl_vector_complex_add$ ^gsl_vector_complex_add_constant$
+ ^gsl_vector_complex_div$ ^gsl_vector_complex_isnonneg$
+ ^gsl_vector_complex_mul$ ^gsl_vector_complex_scale$
+ ^gsl_vector_complex_sub$
+ /],
+ "1.13" => [qw/
+ ^gsl_bspline_greville_abscissa$
+ ^gsl_min_fminimizer_quad_golden$
+ ^gsl_monte_miser_params.* ^gsl_monte_vegas_params ^gsl_monte_vegas_chisq$
+ ^gsl_monte_vegas_runval$
+ ^gsl_poly_eval_derivs$
+ /],
+ "1.14" => [qw/
+ ^gsl_integration_glfixed.*
+ ^gsl_multifit_linear_usvd$ ^gsl_multifit_wlinear_usvd$
+ /],
+ "1.15" => [qw/
+ ^gsl_bspline_deriv.* ^gsl_bspline_eval_nonzero$
+ ^gsl_cheb_order$ ^gsl_cheb_size$ ^gsl_cheb_coeffs$
+ ^gsl_eigen_nonsymmv_params$
+ ^gsl_integration_cquad.*
+ ^gsl_interp_type_min_size$
+ ^gsl_linalg_complex_cholesky_invert$
+ ^gsl_matrix_equal$ ^gsl_matrix_char_equal$ ^gsl_matrix_complex_equal$
+ ^gsl_matrix_int_equal$
+ ^gsl_pow_uint$
+ ^gsl_sf_bessel_Knu_scaled_e10_e$
+ ^gsl_vector_equal$ ^gsl_vector_char_equal$ ^gsl_vector_complex_equal$
+ ^gsl_vector_int_equal$
+ /],
+};
View
47 pod/Diff.pod
@@ -0,0 +1,47 @@
+%perlcode %{
+@EXPORT_OK = qw/
+ gsl_diff_central
+ gsl_diff_backward
+ gsl_diff_forward
+ /;
+%EXPORT_TAGS = ( all => [ @EXPORT_OK ] );
+
+__END__
+
+=head1 NAME
+
+Math::GSL::Diff - Numerical differentiation routines
+
+=head1 SYNOPSIS
+
+ use Math::GSL::Diff qw/:all/;
+
+=head1 DESCRIPTION
+
+Here is a list of all the functions included in this module :
+
+=over
+
+=item C<gsl_diff_central>
+
+=item C<gsl_diff_backward>
+
+=item C<gsl_diff_forward>
+
+=back
+
+=head1 EXAMPLES
+
+=head1 AUTHORS
+
+Jonathan Leto <jonathan@leto.net> and Thierry Moisan <thierry.moisan@gmail.com>
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2008-2009 Jonathan Leto and Thierry Moisan
+
+This program is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.
+
+=cut
+%}
View
1  swig/BLAS.i
@@ -6,6 +6,7 @@
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
%include "gsl/gsl_blas.h"
%include "gsl/gsl_blas_types.h"
%include "../pod/BLAS.pod"
View
1  swig/BSpline.i
@@ -1,6 +1,7 @@
%module "Math::GSL::BSpline"
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
%include "gsl/gsl_bspline.h"
%include "gsl/gsl_vector.h"
%include "../pod/BSpline.pod"
View
1  swig/CBLAS.i
@@ -1,6 +1,7 @@
%module "Math::GSL::CBLAS"
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
%apply double const [] { const double * };
%apply float const [] { const float * };
View
2  swig/CDF.i
@@ -1,6 +1,8 @@
%module "Math::GSL::CDF"
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
+
%{
#include "gsl/gsl_cdf.h"
%}
View
2  swig/Chebyshev.i
@@ -1,6 +1,8 @@
%module "Math::GSL::Chebyshev"
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
+
%{
#include "gsl/gsl_chebyshev.h"
#include "gsl/gsl_math.h"
View
2  swig/Combination.i
@@ -1,6 +1,8 @@
%module "Math::GSL::Combination"
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
+
%{
#include "gsl/gsl_types.h"
#include "gsl/gsl_combination.h"
View
2  swig/Complex.i
@@ -1,6 +1,8 @@
%module "Math::GSL::Complex"
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
+
%{
#include "gsl/gsl_complex.h"
#include "gsl/gsl_complex_math.h"
View
1  swig/Const.i
@@ -1,5 +1,6 @@
%module "Math::GSL::Const"
%include "gsl_typemaps.i"
+%include "renames.i"
%{
#include "gsl/gsl_math.h"
View
1  swig/DHT.i
@@ -1,6 +1,7 @@
%module "Math::GSL::DHT"
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
%{
#include "gsl/gsl_dht.h"
View
1  swig/Deriv.i
@@ -3,6 +3,7 @@
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
%{
#include "gsl/gsl_math.h"
View
12 swig/Diff.i
@@ -1,19 +1,11 @@
%module "Math::GSL::Diff"
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
%{
#include "gsl/gsl_diff.h"
%}
%include "gsl/gsl_diff.h"
-
-
-%perlcode %{
-@EXPORT_OK = qw/
- gsl_diff_central
- gsl_diff_backward
- gsl_diff_forward
- /;
-%EXPORT_TAGS = ( all => [ @EXPORT_OK ] );
-%}
+%include "../pod/Diff.pod"
View
2  swig/Eigen.i
@@ -1,6 +1,8 @@
%module "Math::GSL::Eigen"
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
+
%{
#include "gsl/gsl_eigen.h"
#include "gsl/gsl_complex.h"
View
2  swig/Errno.i
@@ -1,6 +1,8 @@
%module "Math::GSL::Errno"
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
+
%{
#include "gsl/gsl_errno.h"
#include "gsl/gsl_types.h"
View
2  swig/FFT.i
@@ -1,6 +1,8 @@
%module "Math::GSL::FFT"
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
+
%include "gsl/gsl_math.h"
%include "gsl/gsl_sys.h"
%include "gsl/gsl_pow_int.h"
View
1  swig/Fit.i
@@ -1,6 +1,7 @@
%module "Math::GSL::Fit"
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
%apply double *OUTPUT { double * c0, double * c1, double * cov00, double * cov01, double * cov11, double * sumsq, double * chisq };
View
1  swig/Heapsort.i
@@ -1,6 +1,7 @@
%module "Math::GSL::Heapsort"
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
%{
#include "gsl/gsl_heapsort.h"
View
1  swig/Histogram.i
@@ -1,6 +1,7 @@
%module "Math::GSL::Histogram"
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
%apply double *OUTPUT { double * lower, double * upper, size_t * i};
View
1  swig/Histogram2D.i
@@ -1,6 +1,7 @@
%module "Math::GSL::Histogram2D"
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
%apply double *OUTPUT { double * xlower, double * xupper, double * ylower, double * yupper, double * x, double * y};
%apply int *OUTPUT { size_t * i, size_t * j };
View
2  swig/IEEEUtils.i
@@ -1,5 +1,7 @@
%module "Math::GSL::IEEEUtils"
%include "gsl_typemaps.i"
+%include "renames.i"
+
%{
#include "gsl/gsl_ieee_utils.h"
%}
View
1  swig/Integration.i
@@ -1,6 +1,7 @@
%module "Math::GSL::Integration"
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
%{
#include "gsl/gsl_integration.h"
View
1  swig/Interp.i
@@ -2,6 +2,7 @@
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
%apply double *OUTPUT { double * y, double * d, double * d2, double * result };
View
1  swig/Linalg.i
@@ -1,5 +1,6 @@
%module "Math::GSL::Linalg"
%include "gsl_typemaps.i"
+%include "renames.i"
%apply int *OUTPUT { int *signum };
View
1  swig/Machine.i
@@ -1,4 +1,5 @@
%module "Math::GSL::Machine"
+%include "renames.i"
%{
#include "gsl/gsl_machine.h"
View
2  swig/Matrix.i
@@ -3,6 +3,8 @@
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
+
%apply int *OUTPUT { size_t *imin, size_t *imax, size_t *jmin, size_t *jmax };
%apply double *OUTPUT { double * min_out, double * max_out };
View
2  swig/MatrixComplex.i
@@ -3,6 +3,8 @@
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
+
%apply int *OUTPUT { size_t *imin, size_t *imax, size_t *jmin, size_t *jmax };
%apply double *OUTPUT { double * min_out, double * max_out };
View
2  swig/Min.i
@@ -1,6 +1,8 @@
%module "Math::GSL::Min"
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
+
%{
#include "gsl/gsl_types.h"
#include "gsl/gsl_min.h"
View
1  swig/Monte.i
@@ -1,6 +1,7 @@
%module "Math::GSL::Monte"
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
%typemap(argout) ( gsl_monte_function * f, double xl[], double xu[],
size_t dim, size_t calls, gsl_rng * r,
View
2  swig/Multifit.i
@@ -2,6 +2,8 @@
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
+
%apply double *OUTPUT { double * y, double * y_err, double * chisq, size_t * rank};
%{
View
2  swig/Multimin.i
@@ -2,6 +2,8 @@
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
+
%{
#include "gsl/gsl_types.h"
#include "gsl/gsl_multimin.h"
View
1  swig/Multiroots.i
@@ -1,5 +1,6 @@
%module "Math::GSL::Multiroots"
%include "gsl_typemaps.i"
+%include "renames.i"
%typemap(in) gsl_multiroot_function * {
gsl_multiroot_function *f;
View
1  swig/NTuple.i
@@ -1,6 +1,7 @@
%module "Math::GSL::NTuple"
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
// XXX: This needs to properly take the type of array into account,
// this assumes ints
View
2  swig/ODEIV.i
@@ -1,5 +1,7 @@
%module "Math::GSL::ODEIV"
%include "gsl_typemaps.i"
+%include "renames.i"
+
%{
#include "gsl/gsl_odeiv.h"
#include "gsl/gsl_types.h"
View
1  swig/Permutation.i
@@ -1,6 +1,7 @@
%module "Math::GSL::Permutation"
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
%{
#include "gsl/gsl_permute.h"
View
1  swig/Poly.i
@@ -2,6 +2,7 @@
// this brakes stuff
// %include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
%{
#include "gsl/gsl_sys.h"
View
2  swig/PowInt.i
@@ -1,5 +1,7 @@
%module "Math::GSL::PowInt"
%include "gsl_typemaps.i"
+%include "renames.i"
+
%{
#include "gsl/gsl_pow_int.h"
%}
View
1  swig/QRNG.i
@@ -1,6 +1,7 @@
%module "Math::GSL::QRNG"
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
%apply double *OUTPUT { double x[] };
View
2  swig/RNG.i
@@ -1,5 +1,7 @@
%module "Math::GSL::RNG"
%include "gsl_typemaps.i"
+%include "renames.i"
+
%{
#include "gsl/gsl_rng.h"
%}
View
1  swig/Randist.i
@@ -1,6 +1,7 @@
%module "Math::GSL::Randist"
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
void gsl_ran_dir_2d (const gsl_rng * r, double *OUTPUT, double *OUTPUT);
void gsl_ran_dir_2d_trig_method (const gsl_rng * r, double *OUTPUT, double *OUTPUT);
View
2  swig/Roots.i
@@ -1,6 +1,8 @@
%module "Math::GSL::Roots"
%include "gsl_typemaps.i"
%include "typemaps.i"
+%include "renames.i"
+
%{
#include "gsl/gsl_types.h"
#include "gsl/gsl_roots.h"
View
1  swig/SF.i
@@ -1,6 +1,7 @@
%module "Math::GSL::SF"
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
%apply double *OUTPUT { double * sn, double * cn, double * dn, double * sgn };
View
2  swig/Siman.i
@@ -1,6 +1,8 @@
%module "Math::GSL::Siman"
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
+
%{
#include "gsl/gsl_siman.h"
%}
View
1  swig/Sort.i
@@ -3,6 +3,7 @@
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
%typemap(argout) (double * data, const size_t stride, const size_t n) {
int i=0;
View
2  swig/Spline.i
@@ -2,6 +2,8 @@
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
+
%apply double *OUTPUT { double * y, double * d, double * d2, double * result };
%{
View
1  swig/Statistics.i
@@ -2,6 +2,7 @@
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
%apply double *OUTPUT { double * min, double * max };
View
1  swig/Sum.i
@@ -1,5 +1,6 @@
%module "Math::GSL::Sum"
%include "gsl_typemaps.i"
+%include "renames.i"
%apply double *OUTPUT { double * sum_accel, double * abserr, double * abserr_trunc };
View
2  swig/Sys.i
@@ -2,6 +2,8 @@
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
+
%apply int *OUTPUT { int * e };
%{
View
1  swig/Vector.i
@@ -1,6 +1,7 @@
%module "Math::GSL::Vector"
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
FILE * fopen(char *, char *);
int fclose(FILE *);
View
1  swig/VectorComplex.i
@@ -1,6 +1,7 @@
%module "Math::GSL::VectorComplex"
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
%{
#include "gsl/gsl_nan.h"
View
2  swig/Wavelet.i
@@ -1,6 +1,8 @@
%module "Math::GSL::Wavelet"
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
+
%{
#include "gsl/gsl_types.h"
#include "gsl/gsl_wavelet.h"
View
1  swig/Wavelet2D.i
@@ -1,6 +1,7 @@
%module "Math::GSL::Wavelet2D"
%include "typemaps.i"
%include "gsl_typemaps.i"
+%include "renames.i"
%{
#include "gsl/gsl_types.h"
Please sign in to comment.
Something went wrong with that request. Please try again.