Skip to content

Commit

Permalink
vendor: Update vendored sources to igraph/igraph@e940ab7
Browse files Browse the repository at this point in the history
Merge pull request igraph/igraph#2705 from igraph/update/linalg
  • Loading branch information
krlmlr committed Jan 6, 2025
1 parent c0dc86a commit ca3bdd2
Show file tree
Hide file tree
Showing 176 changed files with 5,872 additions and 7,957 deletions.
55 changes: 51 additions & 4 deletions src/vendor/cigraph/ACKNOWLEDGEMENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,53 @@
[igraph](https://igraph.org) includes or links to code from the following sources.


#### [ARPACK-NG 3.7.0](https://github.com/opencollab/arpack-ng)

BSD Software License

Pertains to ARPACK and P_ARPACK

Copyright (c) 1996-2008 Rice University.
Developed by D.C. Sorensen, R.B. Lehoucq, C. Yang, and K. Maschhoff.
All rights reserved.

Arpack has been renamed to arpack-ng.

Copyright (c) 2001-2011 - Scilab Enterprises
Updated by Allan Cornet, Sylvestre Ledru.

Copyright (c) 2010 - Jordi Gutiérrez Hermoso (Octave patch)

Copyright (c) 2007 - Sébastien Fabbro (gentoo patch)

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer listed
in this license in the documentation and/or other materials
provided with the distribution.

- Neither the name of the copyright holders nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#### [bliss 0.75](https://users.aalto.fi/~tjunttil/bliss/)

Copyright (c) 2003-2021 Tommi Junttila.
Expand Down Expand Up @@ -101,13 +148,13 @@ Copyright (C) Christine Solnon.
License: [CeCILL-B license](https://cecill.info/licences.en.html)


#### [LAPACK 3.5.0](http://www.netlib.org/lapack/)
#### [LAPACK 3.5.0](http://www.netlib.org/lapack/) and [BLAS 3.12.0](http://www.netlib.org/blas/)

Copyright (c) 1992-2011 The University of Tennessee and The University of Tennessee Research Foundation. All rights reserved.
Copyright (c) 1992-2013 The University of Tennessee and The University of Tennessee Research Foundation. All rights reserved.

Copyright (c) 2000-2011 The University of California Berkeley. All rights reserved.
Copyright (c) 2000-2013 The University of California Berkeley. All rights reserved.

Copyright (c) 2006-2012 The University of Colorado Denver. All rights reserved.
Copyright (c) 2006-2013 The University of Colorado Denver. All rights reserved.

License: [New BSD license](http://www.netlib.org/lapack/LICENSE.txt)

Expand Down
2 changes: 2 additions & 0 deletions src/vendor/cigraph/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

- Workaround for bug in CMake 3.31.0, see https://gitlab.kitware.com/cmake/cmake/-/issues/26449
- Updated the vendored `plfit` library to version 1.0.0. This works around a bug in some MSVC / Windows SDK versions that define a `NAN` macro that is not a compile-time constant.
- Updated vendored BLAS to 3.12.0 and vendored ARPACK to ARPACK-NG 3.7.0.
- Re-translated vendored BLAS/LAPACK/ARPACK sources with f2c version 20240504.
- Documentation improvements.

## [0.10.15]
Expand Down
3 changes: 3 additions & 0 deletions src/vendor/cigraph/src/f2c.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ typedef char integer1;
typedef short ftnlen;
typedef short ftnint;
#else
/* Note by @szhorvat: 'ftnint' must be kept the same size as 'integer',
* as some of the f2c-generated code passes `integer *` where 'ftnint *'
* is expected. */
typedef int flag;
typedef int ftnlen;
typedef int ftnint;
Expand Down
2 changes: 1 addition & 1 deletion src/vendor/cigraph/vendor/f2c/README
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ This assumes you have the xsum program whose source, xsum.c,
is distributed as part of "all from f2c/src", and that it
is installed somewhere in your search path. If you do not
have xsum, you can obtain xsum.c by sending the following E-mail
message to netlib@netlib.bell-labs.com
message to netlib@netlib.org
send xsum.c from f2c/src

For convenience, the f2c.h0 in this directory is a copy of netlib's
Expand Down
96 changes: 51 additions & 45 deletions src/vendor/cigraph/vendor/f2c/arithchk.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,30 @@ Akind {
int kind;
} Akind;

typedef struct
ErrnoTest {
double (*f)(double);
double *x;
} ErrnoTest;

static double Big = 1e10, Two = 2., t_nan;

static ErrnoTest Entest[] = {
{ log, &t_nan },
{ exp, &Big },
{ asin, &Two },
{ acos, &Two },
{ sqrt, &t_nan }};

static int nEntest = sizeof(Entest)/sizeof(ErrnoTest);

static Akind
IEEE_8087 = { "IEEE_8087", 1 },
IEEE_MC68k = { "IEEE_MC68k", 2 },
IBM = { "IBM", 3 },
VAX = { "VAX", 4 },
CRAY = { "CRAY", 5};

static double t_nan;

static Akind *
Lcheck(void)
{
Expand Down Expand Up @@ -110,21 +125,8 @@ icheck(void)
return 0;
}

/* avoid possible warning message with printf("") */
const char *const emptyfmt = "";

#ifdef __GNUC__
# pragma GCC diagnostic push
# ifndef __clang__
# pragma GCC diagnostic ignored "-Wformat-security"
# pragma GCC diagnostic ignored "-Wunused-but-set-variable"
# else
# pragma GCC diagnostic ignored "-Wformat-zero-length"
# endif
#endif

static Akind *
ccheck(void)
ccheck(int ac, char **av)
{
union {
double d;
Expand All @@ -133,10 +135,11 @@ ccheck(void)
long Cray1;

/* Cray1 = 4617762693716115456 -- without overflow on non-Crays */
Cray1 = printf(emptyfmt) < 0 ? 0 : 4617762;
if (printf(emptyfmt, Cray1) >= 0)
/* The next three tests should always be true. */
Cray1 = ac >= -2 ? 4617762 : 0;
if (ac >= -1)
Cray1 = 1000000*Cray1 + 693716;
if (printf(emptyfmt, Cray1) >= 0)
if (av || ac >= 0)
Cray1 = 1000000*Cray1 + 115456;
u.d = 1e13;
if (u.L == Cray1)
Expand All @@ -163,26 +166,6 @@ fzcheck(void)
return b == 0.;
}

static int
need_nancheck(void)
{
double t;

errno = 0;
t = log(t_nan);
if (errno == 0)
return 1;
errno = 0;
t = sqrt(t_nan);
return errno == 0;
}

#ifdef __GNUC__
# ifndef __clang__
# pragma GCC diagnostic pop
# endif
#endif

void
get_nanbits(unsigned int *b, int k)
{
Expand All @@ -197,13 +180,17 @@ get_nanbits(unsigned int *b, int k)
}

int
main(void)
main(int argc, char **argv)
{
FILE *f;
Akind *a = 0;
int Ldef = 0;
Akind *a;
ErrnoTest *et, *ete;
int Ldef, goodbits, gooderrno, w0;
union { double d; unsigned int u[2]; } u;
unsigned int nanbits[2];

a = 0;
Ldef = 0;
fpinit_ASL();
#ifdef WRITE_ARITH_H /* for Symantec's buggy "make" */
f = fopen("arith.h", "w");
Expand All @@ -222,7 +209,7 @@ main(void)
a = icheck();
}
else if (sizeof(double) == sizeof(long))
a = ccheck();
a = ccheck(argc, argv);
if (a) {
fprintf(f, "#define %s\n#define Arith_Kind_ASL %d\n",
a->name, a->kind);
Expand All @@ -233,20 +220,39 @@ main(void)
if (sizeof(char*) == 8)
fprintf(f, "#define X64_bit_pointers\n");
#ifndef NO_LONG_LONG
if (sizeof(long long) > sizeof(long)
&& sizeof(long long) == sizeof(void*))
fprintf(f, "#define LONG_LONG_POINTERS\n");
if (sizeof(long long) < 8)
#endif
fprintf(f, "#define NO_LONG_LONG\n");

if (a->kind <= 2) {
if (fzcheck())
fprintf(f, "#define Sudden_Underflow\n");
t_nan = -a->kind;
if (need_nancheck())
fprintf(f, "#define NANCHECK\n");
if (sizeof(double) == 2*sizeof(unsigned int)) {
get_nanbits(nanbits, a->kind);
fprintf(f, "#define QNaN0 0x%x\n", nanbits[0]);
fprintf(f, "#define QNaN1 0x%x\n", nanbits[1]);
}
w0 = 2 - a->kind;
goodbits = gooderrno = 0;
ete = Entest + nEntest;
for(et = Entest; et < ete; ++et) {
errno = 0;
u.d = et->f(*et->x);
if (errno)
++gooderrno;
if ((u.u[w0] & 0x7ff00000) == 0x7ff00000)
++goodbits;
}
if (goodbits) {
if (goodbits < nEntest && gooderrno)
fprintf(f, "#define ALSO_CHECK_ERRNO\n");
}
else if (gooderrno)
fprintf(f, "#define CHECK_ERRNO\n");
}
return 0;
}
Expand Down
5 changes: 0 additions & 5 deletions src/vendor/cigraph/vendor/f2c/comptry.bat

This file was deleted.

Loading

0 comments on commit ca3bdd2

Please sign in to comment.