cgo: rename clapack package to lapacke

This commit is contained in:
Vladimir Chalupecky
2016-08-22 09:54:34 +09:00
parent 637ad2a1f1
commit e495d447f8
6 changed files with 10 additions and 10 deletions

View File

@@ -6,7 +6,7 @@
use strict; use strict;
use warnings; use warnings;
my $clapackHeader = "lapacke.h"; my $lapackeHeader = "lapacke.h";
my $lib = join " ", @ARGV; my $lib = join " ", @ARGV;
my $excludeComplex = 0; my $excludeComplex = 0;
@@ -20,23 +20,23 @@ foreach my $obj (@lapack_extendedprecision_objs) {
$xobjs{$obj} = 1; $xobjs{$obj} = 1;
} }
open(my $clapack, "<", $clapackHeader) or die; open(my $lapacke, "<", $lapackeHeader) or die;
open(my $golapack, ">", "clapack.go") or die; open(my $golapack, ">", "lapacke.go") or die;
my %done; my %done;
my %hasWork; my %hasWork;
printf $golapack <<"EOH"; printf $golapack <<"EOH";
// Do not manually edit this file. It was created by the genLapack.pl script from ${clapackHeader}. // Do not manually edit this file. It was created by the genLapack.pl script from ${lapackeHeader}.
// Copyright ©2014 The gonum Authors. All rights reserved. // Copyright ©2014 The gonum Authors. All rights reserved.
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
// Package clapack provides bindings to a C LAPACK library. // Package lapacke provides bindings to the LAPACKE C Interface to LAPACK.
// //
// Links are provided to the NETLIB fortran implementation/dependencies for each function. // Links are provided to the NETLIB fortran implementation/dependencies for each function.
package clapack package lapacke
/* /*
#cgo CFLAGS: -g -O2 #cgo CFLAGS: -g -O2
@@ -47,7 +47,7 @@ if ($lib) {
} }
printf $golapack <<"EOH"; printf $golapack <<"EOH";
#include "${clapackHeader}" #include "${lapackeHeader}"
*/ */
import "C" import "C"
@@ -71,7 +71,7 @@ func isZero(ret C.int) bool { return ret == 0 }
EOH EOH
$/ = undef; $/ = undef;
my $header = <$clapack>; my $header = <$lapacke>;
# horrible munging of text... # horrible munging of text...
$header =~ s/#[^\n\r]*//g; # delete cpp lines $header =~ s/#[^\n\r]*//g; # delete cpp lines

View File

@@ -4,10 +4,10 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
// Package clapack provides bindings to a C LAPACK library. // Package lapacke provides bindings to the LAPACKE C Interface to LAPACK.
// //
// Links are provided to the NETLIB fortran implementation/dependencies for each function. // Links are provided to the NETLIB fortran implementation/dependencies for each function.
package clapack package lapacke
/* /*
#cgo CFLAGS: -g -O2 #cgo CFLAGS: -g -O2