Mercurial > mxe-octave
annotate src/msvc-suitesparse-1.patch @ 5895:2db7f803d55d release
librsb: Update to version 1.2.0.10 (bug #60042).
* src/librsb.mk: Update version and checksum. Remove work-around for fixed bug.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Sun, 19 Sep 2021 14:32:07 +0200 |
parents | fcf98b1d15f1 |
children |
rev | line source |
---|---|
3114
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
1 diff -ur SuiteSparse-orig/AMD/Include/amd.h SuiteSparse/AMD/Include/amd.h |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
2 --- SuiteSparse-orig/AMD/Include/amd.h 2012-06-19 15:14:37 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
3 +++ SuiteSparse/AMD/Include/amd.h 2013-06-27 23:25:11 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
4 @@ -310,15 +310,23 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
5 /* The user can redefine these to change the malloc, free, and printf routines |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
6 * that AMD uses. */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
7 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
8 -#ifndef EXTERN |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
9 -#define EXTERN extern |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
10 +#ifndef AMD_EXTERN |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
11 +# ifdef _MSC_VER |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
12 +# ifdef BUILDING_AMD |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
13 +# define AMD_EXTERN __declspec(dllexport) |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
14 +# else |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
15 +# define AMD_EXTERN __declspec(dllimport) |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
16 +# endif |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
17 +# else |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
18 +# define AMD_EXTERN extern |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
19 +# endif |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
20 #endif |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
21 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
22 -EXTERN void *(*amd_malloc) (size_t) ; /* pointer to malloc */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
23 -EXTERN void (*amd_free) (void *) ; /* pointer to free */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
24 -EXTERN void *(*amd_realloc) (void *, size_t) ; /* pointer to realloc */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
25 -EXTERN void *(*amd_calloc) (size_t, size_t) ; /* pointer to calloc */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
26 -EXTERN int (*amd_printf) (const char *, ...) ; /* pointer to printf */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
27 +AMD_EXTERN void *(*amd_malloc) (size_t) ; /* pointer to malloc */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
28 +AMD_EXTERN void (*amd_free) (void *) ; /* pointer to free */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
29 +AMD_EXTERN void *(*amd_realloc) (void *, size_t) ; /* pointer to realloc */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
30 +AMD_EXTERN void *(*amd_calloc) (size_t, size_t) ; /* pointer to calloc */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
31 +AMD_EXTERN int (*amd_printf) (const char *, ...) ; /* pointer to printf */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
32 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
33 /* ------------------------------------------------------------------------- */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
34 /* AMD Control and Info arrays */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
35 diff -ur SuiteSparse-orig/AMD/Lib/GNUmakefile SuiteSparse/AMD/Lib/GNUmakefile |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
36 --- SuiteSparse-orig/AMD/Lib/GNUmakefile 2012-05-29 17:56:26 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
37 +++ SuiteSparse/AMD/Lib/GNUmakefile 2013-06-27 23:22:54 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
38 @@ -6,7 +6,7 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
39 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
40 include ../../SuiteSparse_config/SuiteSparse_config.mk |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
41 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
42 -C = $(CC) $(CF) -I../Include -I../../SuiteSparse_config |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
43 +C = $(CC) $(CF) -DBUILDING_AMD -I../Include -I../../SuiteSparse_config |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
44 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
45 #------------------------------------------------------------------------------- |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
46 # source files |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
47 diff -ur SuiteSparse-orig/AMD/Lib/Makefile SuiteSparse/AMD/Lib/Makefile |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
48 --- SuiteSparse-orig/AMD/Lib/Makefile 2013-06-29 09:01:01 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
49 +++ SuiteSparse/AMD/Lib/Makefile 2013-06-29 09:00:39 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
50 @@ -10,7 +10,7 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
51 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
52 include ../../SuiteSparse_config/SuiteSparse_config.mk |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
53 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
54 -C = $(CC) $(CF) -I../Include -I../../SuiteSparse_config |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
55 +C = $(CC) $(CF) -DBUILDING_AMD -I../Include -I../../SuiteSparse_config |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
56 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
57 everything: |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
58 $(C) -DDINT -c ../Source/amd_aat.c -o amd_i_aat.o |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
59 diff -ur SuiteSparse-orig/CAMD/Include/camd.h SuiteSparse/CAMD/Include/camd.h |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
60 --- SuiteSparse-orig/CAMD/Include/camd.h 2012-06-19 15:15:17 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
61 +++ SuiteSparse/CAMD/Include/camd.h 2013-06-27 23:27:56 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
62 @@ -321,15 +321,23 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
63 /* The user can redefine these to change the malloc, free, and printf routines |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
64 * that CAMD uses. */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
65 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
66 -#ifndef EXTERN |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
67 -#define EXTERN extern |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
68 +#ifndef CAMD_EXTERN |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
69 +# ifdef _MSC_VER |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
70 +# ifdef BUILDING_CAMD |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
71 +# define CAMD_EXTERN __declspec(dllexport) |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
72 +# else |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
73 +# define CAMD_EXTERN __declspec(dllimport) |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
74 +# endif |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
75 +# else |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
76 +# define CAMD_EXTERN extern |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
77 +# endif |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
78 #endif |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
79 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
80 -EXTERN void *(*camd_malloc) (size_t) ; /* pointer to malloc */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
81 -EXTERN void (*camd_free) (void *) ; /* pointer to free */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
82 -EXTERN void *(*camd_realloc) (void *, size_t) ; /* pointer to realloc */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
83 -EXTERN void *(*camd_calloc) (size_t, size_t) ; /* pointer to calloc */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
84 -EXTERN int (*camd_printf) (const char *, ...) ; /* pointer to printf */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
85 +CAMD_EXTERN void *(*camd_malloc) (size_t) ; /* pointer to malloc */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
86 +CAMD_EXTERN void (*camd_free) (void *) ; /* pointer to free */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
87 +CAMD_EXTERN void *(*camd_realloc) (void *, size_t) ; /* pointer to realloc */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
88 +CAMD_EXTERN void *(*camd_calloc) (size_t, size_t) ; /* pointer to calloc */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
89 +CAMD_EXTERN int (*camd_printf) (const char *, ...) ; /* pointer to printf */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
90 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
91 /* ------------------------------------------------------------------------- */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
92 /* CAMD Control and Info arrays */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
93 diff -ur SuiteSparse-orig/CAMD/Lib/GNUmakefile SuiteSparse/CAMD/Lib/GNUmakefile |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
94 --- SuiteSparse-orig/CAMD/Lib/GNUmakefile 2012-05-26 19:26:47 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
95 +++ SuiteSparse/CAMD/Lib/GNUmakefile 2013-06-27 23:28:36 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
96 @@ -6,7 +6,7 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
97 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
98 include ../../SuiteSparse_config/SuiteSparse_config.mk |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
99 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
100 -C = $(CC) $(CF) -I../Include -I../../SuiteSparse_config |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
101 +C = $(CC) $(CF) -DBUILDING_CAMD -I../Include -I../../SuiteSparse_config |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
102 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
103 #------------------------------------------------------------------------------- |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
104 # source files |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
105 diff -ur SuiteSparse-orig/CAMD/Lib/Makefile SuiteSparse/CAMD/Lib/Makefile |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
106 --- SuiteSparse-orig/CAMD/Lib/Makefile 2013-06-29 09:01:03 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
107 +++ SuiteSparse/CAMD/Lib/Makefile 2013-06-29 09:00:40 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
108 @@ -10,7 +10,7 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
109 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
110 include ../../SuiteSparse_config/SuiteSparse_config.mk |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
111 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
112 -C = $(CC) $(CF) -I../Include -I../../SuiteSparse_config |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
113 +C = $(CC) $(CF) -DBUILDING_CAMD -I../Include -I../../SuiteSparse_config |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
114 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
115 everything: |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
116 $(C) -DDINT -c ../Source/camd_aat.c -o camd_i_aat.o |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
117 diff -ur SuiteSparse-orig/CCOLAMD/Include/ccolamd.h SuiteSparse/CCOLAMD/Include/ccolamd.h |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
118 --- SuiteSparse-orig/CCOLAMD/Include/ccolamd.h 2012-05-29 10:54:52 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
119 +++ SuiteSparse/CCOLAMD/Include/ccolamd.h 2013-06-27 23:34:07 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
120 @@ -350,11 +350,19 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
121 SuiteSparse_long Stack [ ] |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
122 ) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
123 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
124 -#ifndef EXTERN |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
125 -#define EXTERN extern |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
126 +#ifndef CCOLAMD_EXTERN |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
127 +# ifdef _MSC_VER |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
128 +# ifdef BUILDING_CCOLAMD |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
129 +# define CCOLAMD_EXTERN __declspec(dllexport) |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
130 +# else |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
131 +# define CCOLAMD_EXTERN __declspec(dllimport) |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
132 +# endif |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
133 +# else |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
134 +# define CCOLAMD_EXTERN extern |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
135 +# endif |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
136 #endif |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
137 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
138 -EXTERN int (*ccolamd_printf) (const char *, ...) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
139 +CCOLAMD_EXTERN int (*ccolamd_printf) (const char *, ...) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
140 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
141 #ifdef __cplusplus |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
142 } |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
143 diff -ur SuiteSparse-orig/CCOLAMD/Lib/Makefile SuiteSparse/CCOLAMD/Lib/Makefile |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
144 --- SuiteSparse-orig/CCOLAMD/Lib/Makefile 2013-06-29 09:01:03 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
145 +++ SuiteSparse/CCOLAMD/Lib/Makefile 2013-06-29 09:00:40 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
146 @@ -6,7 +6,7 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
147 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
148 include ../../SuiteSparse_config/SuiteSparse_config.mk |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
149 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
150 -I = -I../Include -I../../SuiteSparse_config |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
151 +I = -DBUILDING_CCOLAMD -I../Include -I../../SuiteSparse_config |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
152 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
153 INC = ../Include/ccolamd.h ../../SuiteSparse_config/SuiteSparse_config.h |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
154 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
155 diff -ur SuiteSparse-orig/CHOLMOD/Include/cholmod_blas.h SuiteSparse/CHOLMOD/Include/cholmod_blas.h |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
156 --- SuiteSparse-orig/CHOLMOD/Include/cholmod_blas.h 2012-05-29 11:00:24 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
157 +++ SuiteSparse/CHOLMOD/Include/cholmod_blas.h 2013-07-01 14:51:45 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
158 @@ -52,7 +52,8 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
159 #define CHOLMOD_CYGWIN |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
160 #else |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
161 #define CHOLMOD_WINDOWS |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
162 -#define BLAS_NO_UNDERSCORE |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
163 +/* Not needed with clgfortran */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
164 +/* #define BLAS_NO_UNDERSCORE */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
165 #endif |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
166 #define CHOLMOD_ARCHITECTURE "Microsoft Windows" |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
167 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
168 diff -ur SuiteSparse-orig/COLAMD/Include/colamd.h SuiteSparse/COLAMD/Include/colamd.h |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
169 --- SuiteSparse-orig/COLAMD/Include/colamd.h 2012-05-29 11:03:28 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
170 +++ SuiteSparse/COLAMD/Include/colamd.h 2013-06-27 23:31:19 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
171 @@ -238,11 +238,19 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
172 SuiteSparse_long stats [COLAMD_STATS] |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
173 ) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
174 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
175 -#ifndef EXTERN |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
176 -#define EXTERN extern |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
177 +#ifndef COLAMD_EXTERN |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
178 +# ifdef _MSC_VER |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
179 +# ifdef BUILDING_COLAMD |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
180 +# define COLAMD_EXTERN __declspec(dllexport) |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
181 +# else |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
182 +# define COLAMD_EXTERN __declspec(dllimport) |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
183 +# endif |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
184 +# else |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
185 +# define COLAMD_EXTERN extern |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
186 +# endif |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
187 #endif |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
188 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
189 -EXTERN int (*colamd_printf) (const char *, ...) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
190 +COLAMD_EXTERN int (*colamd_printf) (const char *, ...) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
191 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
192 #ifdef __cplusplus |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
193 } |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
194 diff -ur SuiteSparse-orig/COLAMD/Lib/Makefile SuiteSparse/COLAMD/Lib/Makefile |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
195 --- SuiteSparse-orig/COLAMD/Lib/Makefile 2013-06-29 09:01:08 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
196 +++ SuiteSparse/COLAMD/Lib/Makefile 2013-06-29 09:00:43 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
197 @@ -6,7 +6,7 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
198 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
199 include ../../SuiteSparse_config/SuiteSparse_config.mk |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
200 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
201 -I = -I../Include -I../../SuiteSparse_config |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
202 +I = -DBUILDING_COLAMD -I../Include -I../../SuiteSparse_config |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
203 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
204 INC = ../Include/colamd.h ../../SuiteSparse_config/SuiteSparse_config.h |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
205 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
206 diff -ur SuiteSparse-orig/CSparse/Lib/Makefile SuiteSparse/CSparse/Lib/Makefile |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
207 --- SuiteSparse-orig/CSparse/Lib/Makefile 2013-06-29 09:01:09 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
208 +++ SuiteSparse/CSparse/Lib/Makefile 2013-06-29 09:00:44 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
209 @@ -1,4 +1,4 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
210 -CF = $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -O |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
211 +CF = $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -O2 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
212 I = -I../Include |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
213 RANLIB = ranlib |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
214 ARCHIVE = $(AR) $(ARFLAGS) |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
215 diff -ur SuiteSparse-orig/CSparse/Source/cs_add.c SuiteSparse/CSparse/Source/cs_add.c |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
216 --- SuiteSparse-orig/CSparse/Source/cs_add.c 2011-01-18 13:34:52 -0500 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
217 +++ SuiteSparse/CSparse/Source/cs_add.c 2013-07-01 15:15:36 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
218 @@ -9,9 +9,9 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
219 if (A->m != B->m || A->n != B->n) return (NULL) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
220 m = A->m ; anz = A->p [A->n] ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
221 n = B->n ; Bp = B->p ; Bx = B->x ; bnz = Bp [n] ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
222 - w = cs_calloc (m, sizeof (csi)) ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
223 + w = (csi *) cs_calloc (m, sizeof (csi)) ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
224 values = (A->x != NULL) && (Bx != NULL) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
225 - x = values ? cs_malloc (m, sizeof (double)) : NULL ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
226 + x = values ? (double *) cs_malloc (m, sizeof (double)) : NULL ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
227 C = cs_spalloc (m, n, anz + bnz, values, 0) ; /* allocate result*/ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
228 if (!C || !w || (values && !x)) return (cs_done (C, w, x, 0)) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
229 Cp = C->p ; Ci = C->i ; Cx = C->x ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
230 diff -ur SuiteSparse-orig/CSparse/Source/cs_amd.c SuiteSparse/CSparse/Source/cs_amd.c |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
231 --- SuiteSparse-orig/CSparse/Source/cs_amd.c 2011-01-18 13:38:31 -0500 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
232 +++ SuiteSparse/CSparse/Source/cs_amd.c 2013-07-01 15:15:36 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
233 @@ -59,8 +59,8 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
234 cs_fkeep (C, &cs_diag, NULL) ; /* drop diagonal entries */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
235 Cp = C->p ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
236 cnz = Cp [n] ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
237 - P = cs_malloc (n+1, sizeof (csi)) ; /* allocate result */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
238 - W = cs_malloc (8*(n+1), sizeof (csi)) ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
239 + P = (csi *) cs_malloc (n+1, sizeof (csi)) ; /* allocate result */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
240 + W = (csi *) cs_malloc (8*(n+1), sizeof (csi)) ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
241 t = cnz + cnz/5 + 2*n ; /* add elbow room to C */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
242 if (!P || !W || !cs_sprealloc (C, t)) return (cs_idone (P, C, W, 0)) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
243 len = W ; nv = W + (n+1) ; next = W + 2*(n+1) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
244 diff -ur SuiteSparse-orig/CSparse/Source/cs_chol.c SuiteSparse/CSparse/Source/cs_chol.c |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
245 --- SuiteSparse-orig/CSparse/Source/cs_chol.c 2011-01-18 13:38:42 -0500 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
246 +++ SuiteSparse/CSparse/Source/cs_chol.c 2013-07-01 15:15:36 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
247 @@ -8,9 +8,9 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
248 csn *N ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
249 if (!CS_CSC (A) || !S || !S->cp || !S->parent) return (NULL) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
250 n = A->n ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
251 - N = cs_calloc (1, sizeof (csn)) ; /* allocate result */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
252 - c = cs_malloc (2*n, sizeof (csi)) ; /* get csi workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
253 - x = cs_malloc (n, sizeof (double)) ; /* get double workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
254 + N = (csn *) cs_calloc (1, sizeof (csn)) ; /* allocate result */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
255 + c = (csi *) cs_malloc (2*n, sizeof (csi)) ; /* get csi workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
256 + x = (double *) cs_malloc (n, sizeof (double)) ; /* get double workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
257 cp = S->cp ; pinv = S->pinv ; parent = S->parent ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
258 C = pinv ? cs_symperm (A, pinv, 1) : ((cs *) A) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
259 E = pinv ? C : NULL ; /* E is alias for A, or a copy E=A(p,p) */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
260 diff -ur SuiteSparse-orig/CSparse/Source/cs_cholsol.c SuiteSparse/CSparse/Source/cs_cholsol.c |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
261 --- SuiteSparse-orig/CSparse/Source/cs_cholsol.c 2011-01-18 13:38:46 -0500 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
262 +++ SuiteSparse/CSparse/Source/cs_cholsol.c 2013-07-01 15:15:36 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
263 @@ -10,7 +10,7 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
264 n = A->n ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
265 S = cs_schol (order, A) ; /* ordering and symbolic analysis */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
266 N = cs_chol (A, S) ; /* numeric Cholesky factorization */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
267 - x = cs_malloc (n, sizeof (double)) ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
268 + x = (double *) cs_malloc (n, sizeof (double)) ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
269 ok = (S && N && x) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
270 if (ok) |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
271 { |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
272 diff -ur SuiteSparse-orig/CSparse/Source/cs_compress.c SuiteSparse/CSparse/Source/cs_compress.c |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
273 --- SuiteSparse-orig/CSparse/Source/cs_compress.c 2011-05-10 17:06:24 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
274 +++ SuiteSparse/CSparse/Source/cs_compress.c 2013-07-01 15:15:36 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
275 @@ -8,7 +8,7 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
276 if (!CS_TRIPLET (T)) return (NULL) ; /* check inputs */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
277 m = T->m ; n = T->n ; Ti = T->i ; Tj = T->p ; Tx = T->x ; nz = T->nz ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
278 C = cs_spalloc (m, n, nz, Tx != NULL, 0) ; /* allocate result */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
279 - w = cs_calloc (n, sizeof (csi)) ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
280 + w = (csi *) cs_calloc (n, sizeof (csi)) ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
281 if (!C || !w) return (cs_done (C, w, NULL, 0)) ; /* out of memory */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
282 Cp = C->p ; Ci = C->i ; Cx = C->x ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
283 for (k = 0 ; k < nz ; k++) w [Tj [k]]++ ; /* column counts */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
284 diff -ur SuiteSparse-orig/CSparse/Source/cs_counts.c SuiteSparse/CSparse/Source/cs_counts.c |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
285 --- SuiteSparse-orig/CSparse/Source/cs_counts.c 2011-01-18 13:38:57 -0500 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
286 +++ SuiteSparse/CSparse/Source/cs_counts.c 2013-07-01 15:15:36 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
287 @@ -22,8 +22,8 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
288 if (!CS_CSC (A) || !parent || !post) return (NULL) ; /* check inputs */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
289 m = A->m ; n = A->n ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
290 s = 4*n + (ata ? (n+m+1) : 0) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
291 - delta = colcount = cs_malloc (n, sizeof (csi)) ; /* allocate result */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
292 - w = cs_malloc (s, sizeof (csi)) ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
293 + delta = colcount = (csi *) cs_malloc (n, sizeof (csi)) ; /* allocate result */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
294 + w = (csi *) cs_malloc (s, sizeof (csi)) ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
295 AT = cs_transpose (A, 0) ; /* AT = A' */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
296 if (!AT || !colcount || !w) return (cs_idone (colcount, AT, w, 0)) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
297 ancestor = w ; maxfirst = w+n ; prevleaf = w+2*n ; first = w+3*n ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
298 diff -ur SuiteSparse-orig/CSparse/Source/cs_droptol.c SuiteSparse/CSparse/Source/cs_droptol.c |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
299 --- SuiteSparse-orig/CSparse/Source/cs_droptol.c 2011-01-18 13:39:29 -0500 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
300 +++ SuiteSparse/CSparse/Source/cs_droptol.c 2013-07-01 15:51:23 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
301 @@ -1,7 +1,7 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
302 #include "cs.h" |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
303 static csi cs_tol (csi i, csi j, double aij, void *tol) |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
304 { |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
305 - return (fabs (aij) > *((double *) tol)) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
306 + return (fabs (aij) > *((double*) tol)) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
307 } |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
308 csi cs_droptol (cs *A, double tol) |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
309 { |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
310 diff -ur SuiteSparse-orig/CSparse/Source/cs_dropzeros.c SuiteSparse/CSparse/Source/cs_dropzeros.c |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
311 --- SuiteSparse-orig/CSparse/Source/cs_dropzeros.c 2011-01-18 13:39:32 -0500 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
312 +++ SuiteSparse/CSparse/Source/cs_dropzeros.c 2013-07-01 15:15:36 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
313 @@ -1,7 +1,7 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
314 #include "cs.h" |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
315 static csi cs_nonzero (csi i, csi j, double aij, void *other) |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
316 { |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
317 - return (aij != 0) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
318 + return (aij != 0.) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
319 } |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
320 csi cs_dropzeros (cs *A) |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
321 { |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
322 diff -ur SuiteSparse-orig/CSparse/Source/cs_dupl.c SuiteSparse/CSparse/Source/cs_dupl.c |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
323 --- SuiteSparse-orig/CSparse/Source/cs_dupl.c 2011-01-18 13:39:34 -0500 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
324 +++ SuiteSparse/CSparse/Source/cs_dupl.c 2013-07-01 15:15:36 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
325 @@ -6,7 +6,7 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
326 double *Ax ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
327 if (!CS_CSC (A)) return (0) ; /* check inputs */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
328 m = A->m ; n = A->n ; Ap = A->p ; Ai = A->i ; Ax = A->x ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
329 - w = cs_malloc (m, sizeof (csi)) ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
330 + w = (csi *) cs_malloc (m, sizeof (csi)) ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
331 if (!w) return (0) ; /* out of memory */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
332 for (i = 0 ; i < m ; i++) w [i] = -1 ; /* row i not yet seen */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
333 for (j = 0 ; j < n ; j++) |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
334 diff -ur SuiteSparse-orig/CSparse/Source/cs_etree.c SuiteSparse/CSparse/Source/cs_etree.c |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
335 --- SuiteSparse-orig/CSparse/Source/cs_etree.c 2011-01-18 13:39:43 -0500 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
336 +++ SuiteSparse/CSparse/Source/cs_etree.c 2013-07-01 15:15:36 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
337 @@ -5,8 +5,8 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
338 csi i, k, p, m, n, inext, *Ap, *Ai, *w, *parent, *ancestor, *prev ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
339 if (!CS_CSC (A)) return (NULL) ; /* check inputs */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
340 m = A->m ; n = A->n ; Ap = A->p ; Ai = A->i ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
341 - parent = cs_malloc (n, sizeof (csi)) ; /* allocate result */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
342 - w = cs_malloc (n + (ata ? m : 0), sizeof (csi)) ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
343 + parent = (csi *) cs_malloc (n, sizeof (csi)) ; /* allocate result */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
344 + w = (csi *) cs_malloc (n + (ata ? m : 0), sizeof (csi)) ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
345 if (!w || !parent) return (cs_idone (parent, NULL, w, 0)) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
346 ancestor = w ; prev = w + n ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
347 if (ata) for (i = 0 ; i < m ; i++) prev [i] = -1 ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
348 diff -ur SuiteSparse-orig/CSparse/Source/cs_lu.c SuiteSparse/CSparse/Source/cs_lu.c |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
349 --- SuiteSparse-orig/CSparse/Source/cs_lu.c 2011-01-18 13:40:25 -0500 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
350 +++ SuiteSparse/CSparse/Source/cs_lu.c 2013-07-01 15:15:36 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
351 @@ -9,13 +9,13 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
352 if (!CS_CSC (A) || !S) return (NULL) ; /* check inputs */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
353 n = A->n ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
354 q = S->q ; lnz = S->lnz ; unz = S->unz ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
355 - x = cs_malloc (n, sizeof (double)) ; /* get double workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
356 - xi = cs_malloc (2*n, sizeof (csi)) ; /* get csi workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
357 - N = cs_calloc (1, sizeof (csn)) ; /* allocate result */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
358 + x = (double *) cs_malloc (n, sizeof (double)) ; /* get double workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
359 + xi = (csi *) cs_malloc (2*n, sizeof (csi)) ; /* get csi workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
360 + N = (csn *) cs_calloc (1, sizeof (csn)) ; /* allocate result */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
361 if (!x || !xi || !N) return (cs_ndone (N, NULL, xi, x, 0)) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
362 N->L = L = cs_spalloc (n, n, lnz, 1, 0) ; /* allocate result L */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
363 N->U = U = cs_spalloc (n, n, unz, 1, 0) ; /* allocate result U */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
364 - N->pinv = pinv = cs_malloc (n, sizeof (csi)) ; /* allocate result pinv */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
365 + N->pinv = pinv = (csi *) cs_malloc (n, sizeof (csi)) ; /* allocate result pinv */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
366 if (!L || !U || !pinv) return (cs_ndone (N, NULL, xi, x, 0)) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
367 Lp = L->p ; Up = U->p ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
368 for (i = 0 ; i < n ; i++) x [i] = 0 ; /* clear workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
369 diff -ur SuiteSparse-orig/CSparse/Source/cs_lusol.c SuiteSparse/CSparse/Source/cs_lusol.c |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
370 --- SuiteSparse-orig/CSparse/Source/cs_lusol.c 2011-01-18 13:40:30 -0500 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
371 +++ SuiteSparse/CSparse/Source/cs_lusol.c 2013-07-01 15:15:36 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
372 @@ -10,7 +10,7 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
373 n = A->n ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
374 S = cs_sqr (order, A, 0) ; /* ordering and symbolic analysis */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
375 N = cs_lu (A, S, tol) ; /* numeric LU factorization */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
376 - x = cs_malloc (n, sizeof (double)) ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
377 + x = (double *) cs_malloc (n, sizeof (double)) ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
378 ok = (S && N && x) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
379 if (ok) |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
380 { |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
381 diff -ur SuiteSparse-orig/CSparse/Source/cs_maxtrans.c SuiteSparse/CSparse/Source/cs_maxtrans.c |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
382 --- SuiteSparse-orig/CSparse/Source/cs_maxtrans.c 2011-01-18 13:40:48 -0500 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
383 +++ SuiteSparse/CSparse/Source/cs_maxtrans.c 2013-07-01 15:15:36 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
384 @@ -48,7 +48,7 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
385 cs *C ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
386 if (!CS_CSC (A)) return (NULL) ; /* check inputs */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
387 n = A->n ; m = A->m ; Ap = A->p ; Ai = A->i ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
388 - w = jimatch = cs_calloc (m+n, sizeof (csi)) ; /* allocate result */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
389 + w = jimatch = (csi *) cs_calloc (m+n, sizeof (csi)) ; /* allocate result */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
390 if (!jimatch) return (NULL) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
391 for (k = 0, j = 0 ; j < n ; j++) /* count nonempty rows and columns */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
392 { |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
393 @@ -74,7 +74,7 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
394 n = C->n ; m = C->m ; Cp = C->p ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
395 jmatch = (m2 < n2) ? jimatch + n : jimatch ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
396 imatch = (m2 < n2) ? jimatch : jimatch + m ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
397 - w = cs_malloc (5*n, sizeof (csi)) ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
398 + w = (csi *) cs_malloc (5*n, sizeof (csi)) ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
399 if (!w) return (cs_idone (jimatch, (m2 < n2) ? C : NULL, w, 0)) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
400 cheap = w + n ; js = w + 2*n ; is = w + 3*n ; ps = w + 4*n ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
401 for (j = 0 ; j < n ; j++) cheap [j] = Cp [j] ; /* for cheap assignment */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
402 diff -ur SuiteSparse-orig/CSparse/Source/cs_multiply.c SuiteSparse/CSparse/Source/cs_multiply.c |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
403 --- SuiteSparse-orig/CSparse/Source/cs_multiply.c 2011-01-18 13:40:51 -0500 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
404 +++ SuiteSparse/CSparse/Source/cs_multiply.c 2013-07-01 15:15:36 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
405 @@ -9,9 +9,9 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
406 if (A->n != B->m) return (NULL) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
407 m = A->m ; anz = A->p [A->n] ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
408 n = B->n ; Bp = B->p ; Bi = B->i ; Bx = B->x ; bnz = Bp [n] ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
409 - w = cs_calloc (m, sizeof (csi)) ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
410 + w = (csi *) cs_calloc (m, sizeof (csi)) ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
411 values = (A->x != NULL) && (Bx != NULL) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
412 - x = values ? cs_malloc (m, sizeof (double)) : NULL ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
413 + x = values ? (double *) cs_malloc (m, sizeof (double)) : NULL ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
414 C = cs_spalloc (m, n, anz + bnz, values, 0) ; /* allocate result */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
415 if (!C || !w || (values && !x)) return (cs_done (C, w, x, 0)) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
416 Cp = C->p ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
417 diff -ur SuiteSparse-orig/CSparse/Source/cs_pinv.c SuiteSparse/CSparse/Source/cs_pinv.c |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
418 --- SuiteSparse-orig/CSparse/Source/cs_pinv.c 2011-01-18 13:41:00 -0500 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
419 +++ SuiteSparse/CSparse/Source/cs_pinv.c 2013-07-01 15:15:36 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
420 @@ -4,7 +4,7 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
421 { |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
422 csi k, *pinv ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
423 if (!p) return (NULL) ; /* p = NULL denotes identity */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
424 - pinv = cs_malloc (n, sizeof (csi)) ; /* allocate result */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
425 + pinv = (csi *) cs_malloc (n, sizeof (csi)) ; /* allocate result */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
426 if (!pinv) return (NULL) ; /* out of memory */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
427 for (k = 0 ; k < n ; k++) pinv [p [k]] = k ;/* invert the permutation */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
428 return (pinv) ; /* return result */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
429 diff -ur SuiteSparse-orig/CSparse/Source/cs_post.c SuiteSparse/CSparse/Source/cs_post.c |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
430 --- SuiteSparse-orig/CSparse/Source/cs_post.c 2011-01-18 13:41:03 -0500 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
431 +++ SuiteSparse/CSparse/Source/cs_post.c 2013-07-01 15:15:36 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
432 @@ -4,8 +4,8 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
433 { |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
434 csi j, k = 0, *post, *w, *head, *next, *stack ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
435 if (!parent) return (NULL) ; /* check inputs */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
436 - post = cs_malloc (n, sizeof (csi)) ; /* allocate result */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
437 - w = cs_malloc (3*n, sizeof (csi)) ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
438 + post = (csi *) cs_malloc (n, sizeof (csi)) ; /* allocate result */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
439 + w = (csi *) cs_malloc (3*n, sizeof (csi)) ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
440 if (!w || !post) return (cs_idone (post, NULL, w, 0)) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
441 head = w ; next = w + n ; stack = w + 2*n ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
442 for (j = 0 ; j < n ; j++) head [j] = -1 ; /* empty linked lists */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
443 diff -ur SuiteSparse-orig/CSparse/Source/cs_qr.c SuiteSparse/CSparse/Source/cs_qr.c |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
444 --- SuiteSparse-orig/CSparse/Source/cs_qr.c 2011-01-18 13:41:13 -0500 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
445 +++ SuiteSparse/CSparse/Source/cs_qr.c 2013-07-01 16:01:01 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
446 @@ -11,15 +11,15 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
447 m = A->m ; n = A->n ; Ap = A->p ; Ai = A->i ; Ax = A->x ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
448 q = S->q ; parent = S->parent ; pinv = S->pinv ; m2 = S->m2 ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
449 vnz = S->lnz ; rnz = S->unz ; leftmost = S->leftmost ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
450 - w = cs_malloc (m2+n, sizeof (csi)) ; /* get csi workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
451 - x = cs_malloc (m2, sizeof (double)) ; /* get double workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
452 - N = cs_calloc (1, sizeof (csn)) ; /* allocate result */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
453 + w = (csi *) cs_malloc (m2+n, sizeof (csi)) ; /* get csi workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
454 + x = (double *) cs_malloc (m2, sizeof (double)) ; /* get double workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
455 + N = (csn *) cs_calloc (1, sizeof (csn)) ; /* allocate result */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
456 if (!w || !x || !N) return (cs_ndone (N, NULL, w, x, 0)) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
457 s = w + m2 ; /* s is size n */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
458 for (k = 0 ; k < m2 ; k++) x [k] = 0 ; /* clear workspace x */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
459 N->L = V = cs_spalloc (m2, n, vnz, 1, 0) ; /* allocate result V */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
460 N->U = R = cs_spalloc (m2, n, rnz, 1, 0) ; /* allocate result R */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
461 - N->B = Beta = cs_malloc (n, sizeof (double)) ; /* allocate result Beta */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
462 + N->B = Beta = (double*) cs_malloc (n, sizeof (double)) ; /* allocate result Beta */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
463 if (!R || !V || !Beta) return (cs_ndone (N, NULL, w, x, 0)) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
464 Rp = R->p ; Ri = R->i ; Rx = R->x ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
465 Vp = V->p ; Vi = V->i ; Vx = V->x ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
466 diff -ur SuiteSparse-orig/CSparse/Source/cs_qrsol.c SuiteSparse/CSparse/Source/cs_qrsol.c |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
467 --- SuiteSparse-orig/CSparse/Source/cs_qrsol.c 2011-01-18 13:41:17 -0500 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
468 +++ SuiteSparse/CSparse/Source/cs_qrsol.c 2013-07-01 15:15:36 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
469 @@ -14,7 +14,7 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
470 { |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
471 S = cs_sqr (order, A, 1) ; /* ordering and symbolic analysis */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
472 N = cs_qr (A, S) ; /* numeric QR factorization */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
473 - x = cs_calloc (S ? S->m2 : 1, sizeof (double)) ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
474 + x = (double *) cs_calloc (S ? S->m2 : 1, sizeof (double)) ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
475 ok = (S && N && x) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
476 if (ok) |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
477 { |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
478 @@ -32,7 +32,7 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
479 AT = cs_transpose (A, 1) ; /* Ax=b is underdetermined */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
480 S = cs_sqr (order, AT, 1) ; /* ordering and symbolic analysis */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
481 N = cs_qr (AT, S) ; /* numeric QR factorization of A' */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
482 - x = cs_calloc (S ? S->m2 : 1, sizeof (double)) ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
483 + x = (double *) cs_calloc (S ? S->m2 : 1, sizeof (double)) ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
484 ok = (AT && S && N && x) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
485 if (ok) |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
486 { |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
487 diff -ur SuiteSparse-orig/CSparse/Source/cs_randperm.c SuiteSparse/CSparse/Source/cs_randperm.c |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
488 --- SuiteSparse-orig/CSparse/Source/cs_randperm.c 2011-01-18 13:41:31 -0500 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
489 +++ SuiteSparse/CSparse/Source/cs_randperm.c 2013-07-01 15:15:36 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
490 @@ -6,7 +6,7 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
491 { |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
492 csi *p, k, j, t ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
493 if (seed == 0) return (NULL) ; /* return p = NULL (identity) */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
494 - p = cs_malloc (n, sizeof (csi)) ; /* allocate result */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
495 + p = (csi *) cs_malloc (n, sizeof (csi)) ; /* allocate result */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
496 if (!p) return (NULL) ; /* out of memory */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
497 for (k = 0 ; k < n ; k++) p [k] = n-k-1 ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
498 if (seed == -1) return (p) ; /* return reverse permutation */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
499 diff -ur SuiteSparse-orig/CSparse/Source/cs_scc.c SuiteSparse/CSparse/Source/cs_scc.c |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
500 --- SuiteSparse-orig/CSparse/Source/cs_scc.c 2011-01-18 13:41:44 -0500 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
501 +++ SuiteSparse/CSparse/Source/cs_scc.c 2013-07-01 15:15:36 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
502 @@ -9,7 +9,7 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
503 n = A->n ; Ap = A->p ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
504 D = cs_dalloc (n, 0) ; /* allocate result */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
505 AT = cs_transpose (A, 0) ; /* AT = A' */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
506 - xi = cs_malloc (2*n+1, sizeof (csi)) ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
507 + xi = (csi *) cs_malloc (2*n+1, sizeof (csi)) ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
508 if (!D || !AT || !xi) return (cs_ddone (D, AT, xi, 0)) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
509 Blk = xi ; rcopy = pstack = xi + n ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
510 p = D->p ; r = D->r ; ATp = AT->p ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
511 diff -ur SuiteSparse-orig/CSparse/Source/cs_schol.c SuiteSparse/CSparse/Source/cs_schol.c |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
512 --- SuiteSparse-orig/CSparse/Source/cs_schol.c 2011-01-18 13:41:47 -0500 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
513 +++ SuiteSparse/CSparse/Source/cs_schol.c 2013-07-01 15:15:36 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
514 @@ -7,7 +7,7 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
515 css *S ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
516 if (!CS_CSC (A)) return (NULL) ; /* check inputs */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
517 n = A->n ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
518 - S = cs_calloc (1, sizeof (css)) ; /* allocate result S */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
519 + S = (css *) cs_calloc (1, sizeof (css)) ; /* allocate result S */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
520 if (!S) return (NULL) ; /* out of memory */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
521 P = cs_amd (order, A) ; /* P = amd(A+A'), or natural */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
522 S->pinv = cs_pinv (P, n) ; /* find inverse permutation */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
523 @@ -19,7 +19,7 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
524 c = cs_counts (C, S->parent, post, 0) ; /* find column counts of chol(C) */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
525 cs_free (post) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
526 cs_spfree (C) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
527 - S->cp = cs_malloc (n+1, sizeof (csi)) ; /* allocate result S->cp */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
528 + S->cp = (csi *) cs_malloc (n+1, sizeof (csi)) ; /* allocate result S->cp */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
529 S->unz = S->lnz = cs_cumsum (S->cp, c, n) ; /* find column pointers for L */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
530 cs_free (c) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
531 return ((S->lnz >= 0) ? S : cs_sfree (S)) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
532 diff -ur SuiteSparse-orig/CSparse/Source/cs_sqr.c SuiteSparse/CSparse/Source/cs_sqr.c |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
533 --- SuiteSparse-orig/CSparse/Source/cs_sqr.c 2011-01-18 13:41:59 -0500 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
534 +++ SuiteSparse/CSparse/Source/cs_sqr.c 2013-07-01 15:15:36 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
535 @@ -4,9 +4,9 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
536 { |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
537 csi i, k, p, pa, n = A->n, m = A->m, *Ap = A->p, *Ai = A->i, *next, *head, |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
538 *tail, *nque, *pinv, *leftmost, *w, *parent = S->parent ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
539 - S->pinv = pinv = cs_malloc (m+n, sizeof (csi)) ; /* allocate pinv, */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
540 - S->leftmost = leftmost = cs_malloc (m, sizeof (csi)) ; /* and leftmost */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
541 - w = cs_malloc (m+3*n, sizeof (csi)) ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
542 + S->pinv = pinv = (csi *) cs_malloc (m+n, sizeof (csi)) ; /* allocate pinv, */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
543 + S->leftmost = leftmost = (csi *) cs_malloc (m, sizeof (csi)) ; /* and leftmost */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
544 + w = (csi *) cs_malloc (m+3*n, sizeof (csi)) ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
545 if (!pinv || !w || !leftmost) |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
546 { |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
547 cs_free (w) ; /* pinv and leftmost freed later */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
548 @@ -63,7 +63,7 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
549 css *S ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
550 if (!CS_CSC (A)) return (NULL) ; /* check inputs */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
551 n = A->n ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
552 - S = cs_calloc (1, sizeof (css)) ; /* allocate result S */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
553 + S = (css *) cs_calloc (1, sizeof (css)) ; /* allocate result S */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
554 if (!S) return (NULL) ; /* out of memory */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
555 S->q = cs_amd (order, A) ; /* fill-reducing ordering */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
556 if (order && !S->q) return (cs_sfree (S)) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
557 diff -ur SuiteSparse-orig/CSparse/Source/cs_symperm.c SuiteSparse/CSparse/Source/cs_symperm.c |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
558 --- SuiteSparse-orig/CSparse/Source/cs_symperm.c 2011-01-18 13:42:02 -0500 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
559 +++ SuiteSparse/CSparse/Source/cs_symperm.c 2013-07-01 15:15:36 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
560 @@ -8,7 +8,7 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
561 if (!CS_CSC (A)) return (NULL) ; /* check inputs */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
562 n = A->n ; Ap = A->p ; Ai = A->i ; Ax = A->x ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
563 C = cs_spalloc (n, n, Ap [n], values && (Ax != NULL), 0) ; /* alloc result*/ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
564 - w = cs_calloc (n, sizeof (csi)) ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
565 + w = (csi *) cs_calloc (n, sizeof (csi)) ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
566 if (!C || !w) return (cs_done (C, w, NULL, 0)) ; /* out of memory */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
567 Cp = C->p ; Ci = C->i ; Cx = C->x ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
568 for (j = 0 ; j < n ; j++) /* count entries in each column of C */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
569 diff -ur SuiteSparse-orig/CSparse/Source/cs_transpose.c SuiteSparse/CSparse/Source/cs_transpose.c |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
570 --- SuiteSparse-orig/CSparse/Source/cs_transpose.c 2011-01-18 13:42:10 -0500 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
571 +++ SuiteSparse/CSparse/Source/cs_transpose.c 2013-07-01 15:15:36 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
572 @@ -8,7 +8,7 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
573 if (!CS_CSC (A)) return (NULL) ; /* check inputs */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
574 m = A->m ; n = A->n ; Ap = A->p ; Ai = A->i ; Ax = A->x ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
575 C = cs_spalloc (n, m, Ap [n], values && Ax, 0) ; /* allocate result */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
576 - w = cs_calloc (m, sizeof (csi)) ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
577 + w = (csi *) cs_calloc (m, sizeof (csi)) ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
578 if (!C || !w) return (cs_done (C, w, NULL, 0)) ; /* out of memory */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
579 Cp = C->p ; Ci = C->i ; Cx = C->x ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
580 for (p = 0 ; p < Ap [n] ; p++) w [Ai [p]]++ ; /* row counts */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
581 diff -ur SuiteSparse-orig/CSparse/Source/cs_updown.c SuiteSparse/CSparse/Source/cs_updown.c |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
582 --- SuiteSparse-orig/CSparse/Source/cs_updown.c 2011-01-18 13:42:13 -0500 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
583 +++ SuiteSparse/CSparse/Source/cs_updown.c 2013-07-01 15:15:36 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
584 @@ -8,7 +8,7 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
585 Lp = L->p ; Li = L->i ; Lx = L->x ; n = L->n ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
586 Cp = C->p ; Ci = C->i ; Cx = C->x ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
587 if ((p = Cp [0]) >= Cp [1]) return (1) ; /* return if C empty */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
588 - w = cs_malloc (n, sizeof (double)) ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
589 + w = (double *) cs_malloc (n, sizeof (double)) ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
590 if (!w) return (0) ; /* out of memory */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
591 f = Ci [p] ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
592 for ( ; p < Cp [1] ; p++) f = CS_MIN (f, Ci [p]) ; /* f = min (find (C)) */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
593 diff -ur SuiteSparse-orig/CSparse/Source/cs_util.c SuiteSparse/CSparse/Source/cs_util.c |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
594 --- SuiteSparse-orig/CSparse/Source/cs_util.c 2012-05-28 05:07:52 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
595 +++ SuiteSparse/CSparse/Source/cs_util.c 2013-07-01 15:38:22 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
596 @@ -2,15 +2,15 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
597 /* allocate a sparse matrix (triplet form or compressed-column form) */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
598 cs *cs_spalloc (csi m, csi n, csi nzmax, csi values, csi triplet) |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
599 { |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
600 - cs *A = cs_calloc (1, sizeof (cs)) ; /* allocate the cs struct */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
601 + cs *A = (cs *) cs_calloc (1, sizeof (cs)) ; /* allocate the cs struct */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
602 if (!A) return (NULL) ; /* out of memory */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
603 A->m = m ; /* define dimensions and nzmax */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
604 A->n = n ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
605 A->nzmax = nzmax = CS_MAX (nzmax, 1) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
606 A->nz = triplet ? 0 : -1 ; /* allocate triplet or comp.col */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
607 - A->p = cs_malloc (triplet ? nzmax : n+1, sizeof (csi)) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
608 - A->i = cs_malloc (nzmax, sizeof (csi)) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
609 - A->x = values ? cs_malloc (nzmax, sizeof (double)) : NULL ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
610 + A->p = (csi *) cs_malloc (triplet ? nzmax : n+1, sizeof (csi)) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
611 + A->i = (csi *) cs_malloc (nzmax, sizeof (csi)) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
612 + A->x = values ? (double *) cs_malloc (nzmax, sizeof (double)) : NULL ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
613 return ((!A->p || !A->i || (values && !A->x)) ? cs_spfree (A) : A) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
614 } |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
615 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
616 @@ -20,9 +20,9 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
617 csi ok, oki, okj = 1, okx = 1 ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
618 if (!A) return (0) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
619 if (nzmax <= 0) nzmax = (CS_CSC (A)) ? (A->p [A->n]) : A->nz ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
620 - A->i = cs_realloc (A->i, nzmax, sizeof (csi), &oki) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
621 - if (CS_TRIPLET (A)) A->p = cs_realloc (A->p, nzmax, sizeof (csi), &okj) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
622 - if (A->x) A->x = cs_realloc (A->x, nzmax, sizeof (double), &okx) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
623 + A->i = (csi *) cs_realloc (A->i, nzmax, sizeof (csi), &oki) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
624 + if (CS_TRIPLET (A)) A->p = (csi *) cs_realloc (A->p, nzmax, sizeof (csi), &okj) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
625 + if (A->x) A->x = (double *) cs_realloc (A->x, nzmax, sizeof (double), &okx) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
626 ok = (oki && okj && okx) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
627 if (ok) A->nzmax = nzmax ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
628 return (ok) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
629 @@ -65,13 +65,13 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
630 csd *cs_dalloc (csi m, csi n) |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
631 { |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
632 csd *D ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
633 - D = cs_calloc (1, sizeof (csd)) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
634 + D = (csd *) cs_calloc (1, sizeof (csd)) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
635 if (!D) return (NULL) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
636 - D->p = cs_malloc (m, sizeof (csi)) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
637 - D->r = cs_malloc (m+6, sizeof (csi)) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
638 - D->q = cs_malloc (n, sizeof (csi)) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
639 - D->s = cs_malloc (n+6, sizeof (csi)) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
640 - return ((!D->p || !D->r || !D->q || !D->s) ? cs_dfree (D) : D) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
641 + D->p = (csi *) cs_malloc (m, sizeof (csi)) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
642 + D->r = (csi *) cs_malloc (m+6, sizeof (csi)) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
643 + D->q = (csi *) cs_malloc (n, sizeof (csi)) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
644 + D->s = (csi *) cs_malloc (n+6, sizeof (csi)) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
645 + return ((!D->p || !D->r || !D->q || !D->s) ? (csd *) cs_dfree (D) : D) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
646 } |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
647 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
648 /* free a cs_dmperm or cs_scc result */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
649 @@ -90,7 +90,7 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
650 { |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
651 cs_free (w) ; /* free workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
652 cs_free (x) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
653 - return (ok ? C : cs_spfree (C)) ; /* return result if OK, else free it */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
654 + return (ok ? C : (cs *) cs_spfree (C)) ; /* return result if OK, else free it */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
655 } |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
656 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
657 /* free workspace and return csi array result */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
658 @@ -107,7 +107,7 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
659 cs_spfree (C) ; /* free temporary matrix */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
660 cs_free (w) ; /* free workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
661 cs_free (x) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
662 - return (ok ? N : cs_nfree (N)) ; /* return result if OK, else free it */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
663 + return (ok ? N : (csn *) cs_nfree (N)) ; /* return result if OK, else free it */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
664 } |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
665 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
666 /* free workspace and return a csd result */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
667 @@ -115,5 +115,5 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
668 { |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
669 cs_spfree (C) ; /* free temporary matrix */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
670 cs_free (w) ; /* free workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
671 - return (ok ? D : cs_dfree (D)) ; /* return result if OK, else free it */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
672 + return (ok ? D : (csd *) cs_dfree (D)) ; /* return result if OK, else free it */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
673 } |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
674 diff -ur SuiteSparse-orig/CSparse_to_CXSparse SuiteSparse/CSparse_to_CXSparse |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
675 --- SuiteSparse-orig/CSparse_to_CXSparse 2012-05-29 17:47:52 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
676 +++ SuiteSparse/CSparse_to_CXSparse 2013-07-01 15:59:11 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
677 @@ -249,7 +249,7 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
678 # (double) and (double *) typecasts stay double, |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
679 # tol and vnz for cs_vcount stays double |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
680 s/\(CS_ENTRY\) /(double) /g; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
681 - s/\(CS_ENTRY \*\) /(double \*) /; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
682 + s/\(CS_ENTRY\*\) /(double\*) /; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
683 s/CS_ENTRY tol/double tol/; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
684 s/CS_ENTRY \*vnz/double \*vnz/; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
685 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
686 diff -ur SuiteSparse-orig/CXSparse_newfiles/Include/cs.h SuiteSparse/CXSparse_newfiles/Include/cs.h |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
687 --- SuiteSparse-orig/CXSparse_newfiles/Include/cs.h 2012-05-27 07:16:41 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
688 +++ SuiteSparse/CXSparse_newfiles/Include/cs.h 2013-07-01 16:33:36 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
689 @@ -13,6 +13,12 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
690 #ifndef NCOMPLEX |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
691 #include <complex> |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
692 typedef std::complex<double> cs_complex_t ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
693 +#ifdef _MSC_VER |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
694 +#define creal(x) ((x).real()) |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
695 +#define cimag(x) ((x).imag()) |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
696 +#define cabs(x) abs(x) |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
697 +#define I cs_complex_t(0., 1.) |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
698 +#endif |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
699 #endif |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
700 extern "C" { |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
701 #else |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
702 @@ -22,6 +28,12 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
703 #endif |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
704 #endif |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
705 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
706 +#if defined(_MSC_VER) && defined(BUILDING_CXSPARSE) |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
707 +#define CXSPARSE_EXTERN __declspec(dllexport) |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
708 +#else |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
709 +#define CXSPARSE_EXTERN |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
710 +#endif |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
711 + |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
712 #define CS_VER 2 /* CXSparse Version */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
713 #define CS_SUBVER 3 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
714 #define CS_SUBSUB 0 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
715 @@ -419,7 +431,6 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
716 int *cs_ci_etree (const cs_ci *A, int ata) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
717 int cs_ci_fkeep (cs_ci *A, int (*fkeep) (int, int, cs_complex_t, void *), |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
718 void *other) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
719 -cs_complex_t cs_ci_house (cs_complex_t *x, double *beta, int n) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
720 int *cs_ci_maxtrans (const cs_ci *A, int seed) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
721 int *cs_ci_post (const int *parent, int n) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
722 cs_cid *cs_ci_scc (cs_ci *A) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
723 @@ -559,7 +570,6 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
724 cs_long_t *cs_cl_etree (const cs_cl *A, cs_long_t ata) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
725 cs_long_t cs_cl_fkeep (cs_cl *A, |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
726 cs_long_t (*fkeep) (cs_long_t, cs_long_t, cs_complex_t, void *), void *other) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
727 -cs_complex_t cs_cl_house (cs_complex_t *x, double *beta, cs_long_t n) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
728 cs_long_t *cs_cl_maxtrans (const cs_cl *A, cs_long_t seed) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
729 cs_long_t *cs_cl_post (const cs_long_t *parent, cs_long_t n) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
730 cs_cld *cs_cl_scc (cs_cl *A) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
731 @@ -735,4 +745,8 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
732 #ifdef __cplusplus |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
733 } |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
734 #endif |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
735 + |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
736 +CXSPARSE_EXTERN cs_complex_t cs_ci_house (cs_complex_t *x, double *beta, int n) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
737 +CXSPARSE_EXTERN cs_complex_t cs_cl_house (cs_complex_t *x, double *beta, cs_long_t n) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
738 + |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
739 #endif |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
740 diff -ur SuiteSparse-orig/CXSparse_newfiles/Lib/Makefile SuiteSparse/CXSparse_newfiles/Lib/Makefile |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
741 --- SuiteSparse-orig/CXSparse_newfiles/Lib/Makefile 2013-06-29 09:01:16 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
742 +++ SuiteSparse/CXSparse_newfiles/Lib/Makefile 2013-07-01 16:34:02 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
743 @@ -5,7 +5,7 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
744 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
745 include ../../SuiteSparse_config/SuiteSparse_config.mk |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
746 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
747 -I = -I../../SuiteSparse_config -I../Include |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
748 +I = -TP -EHsc -DBUILDING_CXSPARSE -I../../SuiteSparse_config -I../Include |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
749 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
750 all: libcxsparse.a |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
751 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
752 diff -ur SuiteSparse-orig/CXSparse_newfiles/Source/cs_house.c SuiteSparse/CXSparse_newfiles/Source/cs_house.c |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
753 --- SuiteSparse-orig/CXSparse_newfiles/Source/cs_house.c 2009-03-25 11:44:42 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
754 +++ SuiteSparse/CXSparse_newfiles/Source/cs_house.c 2013-07-01 15:22:42 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
755 @@ -11,7 +11,7 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
756 /* s = norm(x) */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
757 for (i = 0 ; i < n ; i++) s += x [i] * CS_CONJ (x [i]) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
758 s = sqrt (s) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
759 - if (s == 0) |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
760 + if (s == 0.0) |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
761 { |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
762 (*beta) = 0 ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
763 x [0] = 1 ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
764 @@ -19,7 +19,7 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
765 else |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
766 { |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
767 /* s = sign(x[0]) * norm (x) ; */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
768 - if (x [0] != 0) |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
769 + if (x [0] != 0.0) |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
770 { |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
771 s *= x [0] / CS_ABS (x [0]) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
772 } |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
773 diff -ur SuiteSparse-orig/CXSparse_newfiles/Source/cs_updown.c SuiteSparse/CXSparse_newfiles/Source/cs_updown.c |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
774 --- SuiteSparse-orig/CXSparse_newfiles/Source/cs_updown.c 2009-03-25 11:44:42 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
775 +++ SuiteSparse/CXSparse_newfiles/Source/cs_updown.c 2013-07-01 16:11:02 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
776 @@ -12,7 +12,7 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
777 Lp = L->p ; Li = L->i ; Lx = L->x ; n = L->n ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
778 Cp = C->p ; Ci = C->i ; Cx = C->x ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
779 if ((p = Cp [0]) >= Cp [1]) return (1) ; /* return if C empty */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
780 - w = cs_malloc (n, sizeof (CS_ENTRY)) ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
781 + w = (CS_ENTRY *) cs_malloc (n, sizeof (CS_ENTRY)) ; /* get workspace */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
782 if (!w) return (0) ; /* out of memory */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
783 f = Ci [p] ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
784 for ( ; p < Cp [1] ; p++) f = CS_MIN (f, Ci [p]) ; /* f = min (find (C)) */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
785 @@ -22,11 +22,11 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
786 { |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
787 p = Lp [j] ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
788 alpha = w [j] / Lx [p] ; /* alpha = w(j) / L(j,j) */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
789 - beta2 = beta*beta + sigma*alpha*CS_CONJ(alpha) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
790 + beta2 = CS_REAL(beta*beta + double(sigma)*alpha*CS_CONJ(alpha)) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
791 if (beta2 <= 0) break ; /* not positive definite */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
792 beta2 = sqrt (beta2) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
793 delta = (sigma > 0) ? (beta / beta2) : (beta2 / beta) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
794 - gamma = sigma * CS_CONJ(alpha) / (beta2 * beta) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
795 + gamma = double(sigma) * CS_CONJ(alpha) / (beta2 * beta) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
796 Lx [p] = delta * Lx [p] + ((sigma > 0) ? (gamma * w [j]) : 0) ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
797 beta = beta2 ; |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
798 #ifdef CS_COMPLEX |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
799 diff -ur SuiteSparse-orig/SuiteSparse_config/SuiteSparse_config.mk SuiteSparse/SuiteSparse_config/SuiteSparse_config.mk |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
800 --- SuiteSparse-orig/SuiteSparse_config/SuiteSparse_config.mk 2012-06-21 01:04:45 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
801 +++ SuiteSparse/SuiteSparse_config/SuiteSparse_config.mk 2013-06-27 23:17:53 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
802 @@ -60,7 +60,7 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
803 # C and C++ compiler flags. The first three are standard for *.c and *.cpp |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
804 # Add -DNTIMER if you do use any timing routines (otherwise -lrt is required). |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
805 # CF = $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -O3 -fexceptions -fPIC -DNTIMER |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
806 - CF = $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -O3 -fexceptions -fPIC |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
807 + CF = $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -O2 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
808 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
809 # ranlib, and ar, for generating libraries. If you don't need ranlib, |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
810 # just change it to RANLAB = echo |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
811 diff -ur SuiteSparse-orig/UMFPACK/Source/cholmod_blas.h SuiteSparse/UMFPACK/Source/cholmod_blas.h |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
812 --- SuiteSparse-orig/UMFPACK/Source/cholmod_blas.h 2012-05-29 12:23:55 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
813 +++ SuiteSparse/UMFPACK/Source/cholmod_blas.h 2013-07-01 14:53:00 -0400 |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
814 @@ -44,7 +44,8 @@ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
815 #define CHOLMOD_CYGWIN |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
816 #else |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
817 #define CHOLMOD_WINDOWS |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
818 -#define BLAS_NO_UNDERSCORE |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
819 +/* Not required for clgfotran */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
820 +/* #define BLAS_NO_UNDERSCORE */ |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
821 #endif |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
822 #define CHOLMOD_ARCHITECTURE "Microsoft Windows" |
fcf98b1d15f1
[MSVC] enable SuiteSparse compilation
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
823 |