Skip to content

Commit

Permalink
vendor: Update vendored sources to igraph/igraph@2cdc20a
Browse files Browse the repository at this point in the history
chore: update plfit
fuzzer: use libxml2 2.13.5
chore(deps): bump codecov/codecov-action from 4 to 5
  • Loading branch information
krlmlr committed Jan 6, 2025
1 parent bd81476 commit d9430e0
Show file tree
Hide file tree
Showing 6 changed files with 221 additions and 67 deletions.
4 changes: 2 additions & 2 deletions src/vendor/cigraph/vendor/plfit/arithmetic_ansi.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* THE SOFTWARE.
*/

/* $Id: arithmetic_ansi.h 65 2010-01-29 12:19:16Z naoaki $ */
/* $Id$ */

#include <stdlib.h>
#include <memory.h>
Expand Down Expand Up @@ -51,7 +51,7 @@ inline static void vecfree(void *memblock)
inline static void vecset(lbfgsfloatval_t *x, const lbfgsfloatval_t c, const int n)
{
int i;

for (i = 0;i < n;++i) {
x[i] = c;
}
Expand Down
22 changes: 11 additions & 11 deletions src/vendor/cigraph/vendor/plfit/arithmetic_sse_double.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,12 @@
* THE SOFTWARE.
*/

/* $Id: arithmetic_sse_double.h 65 2010-01-29 12:19:16Z naoaki $ */
/* $Id$ */

#include <stdlib.h>

#if !defined(__APPLE__)
#ifndef __APPLE__
#include <malloc.h>
#endif

#include <memory.h>

#if 1400 <= _MSC_VER
Expand All @@ -43,13 +41,15 @@

inline static void* vecalloc(size_t size)
{
#ifdef _WIN32
#if defined(_WIN32)
void *memblock = _aligned_malloc(size, 16);
#elif defined(__APPLE__)
/* Memory on Mac OS X is already aligned to 16 bytes */
void *memblock = malloc(size);
#elif defined(__APPLE__) /* OS X always aligns on 16-byte boundaries */
void *memblock = malloc(size);
#else
void *memblock = memalign(16, size);
void *memblock = NULL, *p = NULL;
if (posix_memalign(&p, 16, size) == 0) {
memblock = p;
}
#endif
if (memblock != NULL) {
memset(memblock, 0, size);
Expand All @@ -59,7 +59,7 @@ inline static void* vecalloc(size_t size)

inline static void vecfree(void *memblock)
{
#ifdef _WIN32
#ifdef _MSC_VER
_aligned_free(memblock);
#else
free(memblock);
Expand Down Expand Up @@ -199,7 +199,7 @@ inline static void vecfree(void *memblock)



#if 3 <= __SSE__
#if 3 <= __SSE__ || defined(__SSE3__)
/*
Horizontal add with haddps SSE3 instruction. The work register (rw)
is unused.
Expand Down
21 changes: 16 additions & 5 deletions src/vendor/cigraph/vendor/plfit/arithmetic_sse_float.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,12 @@
* THE SOFTWARE.
*/

/* $Id: arithmetic_sse_float.h 65 2010-01-29 12:19:16Z naoaki $ */
/* $Id$ */

#include <stdlib.h>

#if !defined(__APPLE__)
#ifndef __APPLE__
#include <malloc.h>
#endif

#include <memory.h>

#if 1400 <= _MSC_VER
Expand All @@ -49,7 +47,16 @@

inline static void* vecalloc(size_t size)
{
#if defined(_MSC_VER)
void *memblock = _aligned_malloc(size, 16);
#elif defined(__APPLE__) /* OS X always aligns on 16-byte boundaries */
void *memblock = malloc(size);
#else
void *memblock = NULL, *p = NULL;
if (posix_memalign(&p, 16, size) == 0) {
memblock = p;
}
#endif
if (memblock != NULL) {
memset(memblock, 0, size);
}
Expand All @@ -58,7 +65,11 @@ inline static void* vecalloc(size_t size)

inline static void vecfree(void *memblock)
{
#ifdef _MSC_VER
_aligned_free(memblock);
#else
free(memblock);
#endif
}

#define vecset(x, c, n) \
Expand Down Expand Up @@ -189,7 +200,7 @@ inline static void vecfree(void *memblock)



#if 3 <= __SSE__
#if 3 <= __SSE__ || defined(__SSE3__)
/*
Horizontal add with haddps SSE3 instruction. The work register (rw)
is unused.
Expand Down
Loading

0 comments on commit d9430e0

Please sign in to comment.