Mercurial > mxe-octave
annotate src/of-sparsersb-1-fixes.patch @ 4185:b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
* src/of-sparsersb-1-fixes.patch: update patch
* src/librsb.mk: remove --disable-openmp
author | John D |
---|---|
date | Mon, 08 Aug 2016 17:23:57 -0400 |
parents | fc1bee8ff2d4 |
children |
rev | line source |
---|---|
4184 | 1 diff -ur sparsersb-1.0.1.orig/src/sparsersb.cc sparsersb-1.0.1/src/sparsersb.cc |
2 --- sparsersb-1.0.1.orig/src/sparsersb.cc 2016-08-07 18:22:30.539481175 -0400 | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
3 +++ sparsersb-1.0.1/src/sparsersb.cc 2016-08-08 12:07:33.136989176 -0400 |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
4 @@ -87,6 +87,8 @@ |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
5 #endif |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
6 #endif |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
7 |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
8 +#define RSBOI_USE_PATCH_38143 ( defined(OCTAVE_MAJOR_VERSION) && (OCTAVE_MAJOR_VERSION>=4) ) /* See http://savannah.gnu.org/bugs/?48335#comment5 */ |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
9 + |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
10 #if 0 |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
11 #define RSBOI_WARN( MSG ) \ |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
12 octave_stdout << "Warning in "<<__func__<<"(), in file "<<__FILE__<<" at line "<<__LINE__<<":\n" << MSG; |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
13 @@ -1239,7 +1241,9 @@ |
4184 | 14 |
15 private: | |
16 public: | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
17 +#if !RSBOI_USE_PATCH_38143 |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
18 DECLARE_OCTAVE_ALLOCATOR |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
19 +#endif /* RSBOI_USE_PATCH_38143 */ |
4184 | 20 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA |
21 };/* end of class octave_sparsersb_mtx definition */ | |
22 | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
23 @@ -1253,10 +1257,24 @@ |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
24 } |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
25 #endif |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
26 |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
27 +#if RSBOI_USE_PATCH_38143 |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
28 +#define RSBOI_CAST_CONV_ARG(ARGT) /* Seems like in 4.1.0+ CAST_CONV_ARG is not there. */ \ |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
29 + ARGT v = dynamic_cast< ARGT > (a) |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
30 +#define RSBOI_CAST_UNOP_ARG(ARGT) /* Seems like in 4.1.0+ CAST_UNOP_ARG is not there. */ \ |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
31 + RSBOI_CAST_CONV_ARG(ARGT) |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
32 +#define RSB_CAST_BINOP_ARGS(ARGT_V1, ARGT_V2); /* Seems like in 4.1.0+ CAST_BINOP_ARGS is not there. */ \ |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
33 + ARGT_V1 v1 = dynamic_cast< ARGT_V1 > (a1); \ |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
34 + ARGT_V2 v2 = dynamic_cast< ARGT_V2 > (a2); |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
35 +#else /* RSBOI_USE_PATCH_38143 */ |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
36 +#define RSBOI_CAST_CONV_ARG CAST_CONV_ARG |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
37 +#define RSBOI_CAST_UNOP_ARG CAST_UNOP_ARG |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
38 +#define RSB_CAST_BINOP_ARGS CAST_BINOP_ARGS |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
39 +#endif /* RSBOI_USE_PATCH_38143 */ |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
40 + |
4184 | 41 static octave_base_value * default_numeric_conversion_function (const octave_base_value& a) |
42 { | |
43 RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG); | |
44 - CAST_CONV_ARG (const octave_sparsersb_mtx&); | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
45 + RSBOI_CAST_CONV_ARG (const octave_sparsersb_mtx&); |
4184 | 46 RSBOI_WARN(RSBOI_O_MISSIMPERRMSG); |
47 RSBOI_WARN(RSBOI_0_UNFFEMSG); | |
48 if(v.is_real_type()) | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
49 @@ -1274,7 +1292,7 @@ |
4184 | 50 { |
51 RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG); | |
52 RSBOI_WARN(RSBOI_O_MISSIMPERRMSG); | |
53 - CAST_CONV_ARG (const octave_sparsersb_mtx &); | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
54 + RSBOI_CAST_CONV_ARG (const octave_sparsersb_mtx&); |
4184 | 55 return new octave_sparse_matrix (v.matrix_value ()); |
56 } | |
57 | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
58 @@ -1283,7 +1301,7 @@ |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
59 { |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
60 RSBOI_WARN(RSBOI_O_MISSIMPERRMSG); |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
61 RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG); |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
62 - CAST_CONV_ARG (const octave_sparsersb_mtx &); |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
63 + RSBOI_CAST_CONV_ARG (const octave_sparsersb_mtx&); |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
64 return new octave_sparse_matrix (v.matrix_value ()); |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
65 } |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
66 #endif |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
67 @@ -1292,7 +1310,7 @@ |
4184 | 68 { |
69 RSBOI_WARN(RSBOI_O_MISSIMPERRMSG); | |
70 RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG); | |
71 - CAST_UNOP_ARG (const octave_sparsersb_mtx&); | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
72 + RSBOI_CAST_UNOP_ARG (const octave_sparsersb_mtx&); |
4184 | 73 return new octave_sparsersb_mtx (v); |
74 } | |
75 | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
76 @@ -1301,7 +1319,7 @@ |
4184 | 77 { |
78 RSBOI_WARN(RSBOI_O_MISSIMPERRMSG); | |
79 RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG); | |
80 - CAST_UNOP_ARG (const octave_sparsersb_mtx&); | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
81 + RSBOI_CAST_UNOP_ARG (const octave_sparsersb_mtx&); |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
82 const octave_idx_type rn=v.mtxAp->nrA,cn=v.mtxAp->ncA; |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
83 Matrix v2(rn,cn); |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
84 octave_value retval = v2; |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
85 @@ -1315,7 +1333,7 @@ |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
86 { |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
87 RSBOI_WARN(RSBOI_O_MISSIMPERRMSG); |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
88 RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG); |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
89 - CAST_UNOP_ARG (const octave_sparsersb_mtx&); |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
90 + RSBOI_CAST_UNOP_ARG (const octave_sparsersb_mtx&); |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
91 const octave_idx_type rn=v.mtxAp->nrA,cn=v.mtxAp->ncA; |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
92 Matrix v2(rn,cn); |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
93 octave_value retval = v2; |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
94 @@ -1330,21 +1348,21 @@ |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
95 { |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
96 RSBOI_WARN(RSBOI_O_MISSIMPERRMSG); |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
97 RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG); |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
98 - CAST_UNOP_ARG (const octave_sparsersb_mtx&); |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
99 + RSBOI_CAST_UNOP_ARG (const octave_sparsersb_mtx&); |
4184 | 100 return v.cp_ubop(RSB_ELOPF_NEG); |
101 } | |
102 | |
103 DEFUNOP (transpose, sparse_rsb_mtx) | |
104 { | |
105 RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG); | |
106 - CAST_UNOP_ARG (const octave_sparsersb_mtx&); | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
107 + RSBOI_CAST_UNOP_ARG (const octave_sparsersb_mtx&); |
4184 | 108 return v.rsboi_get_scaled_copy(rsboi_pone[0],RSB_TRANSPOSITION_T); |
109 } | |
110 | |
111 DEFUNOP (htranspose, sparse_rsb_mtx) | |
112 { | |
113 RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG); | |
114 - CAST_UNOP_ARG (const octave_sparsersb_mtx&); | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
115 + RSBOI_CAST_UNOP_ARG (const octave_sparsersb_mtx&); |
4184 | 116 return v.rsboi_get_scaled_copy(rsboi_pone[0],RSB_TRANSPOSITION_C); |
117 } | |
118 | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
119 @@ -1454,7 +1472,7 @@ |
4184 | 120 DEFBINOP(ldiv, sparse_rsb_mtx, matrix) |
121 { | |
122 RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG); | |
123 - CAST_BINOP_ARGS (const octave_sparsersb_mtx&, const octave_matrix&); | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
124 + RSB_CAST_BINOP_ARGS (const octave_sparsersb_mtx&, const octave_matrix&); |
4184 | 125 |
126 if(v1.is__triangular()) | |
127 return rsboi_spsm(v1,v2,RSB_TRANSPOSITION_N); | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
128 @@ -1469,7 +1487,7 @@ |
4184 | 129 DEFBINOP(trans_ldiv, sparse_rsb_mtx, matrix) |
130 { | |
131 RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG); | |
132 - CAST_BINOP_ARGS (const octave_sparsersb_mtx&, const octave_matrix&); | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
133 + RSB_CAST_BINOP_ARGS (const octave_sparsersb_mtx&, const octave_matrix&); |
4184 | 134 |
135 if(v1.is__triangular()) | |
136 return rsboi_spsm(v1,v2,RSB_TRANSPOSITION_T); | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
137 @@ -1485,7 +1503,7 @@ |
4184 | 138 DEFBINOP(c_ldiv, sparse_rsb_mtx, matrix) |
139 { | |
140 RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG); | |
141 - CAST_BINOP_ARGS (const octave_sparsersb_mtx&, const octave_complex_matrix&); | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
142 + RSB_CAST_BINOP_ARGS (const octave_sparsersb_mtx&, const octave_complex_matrix&); |
4184 | 143 |
144 if(v1.is__triangular()) | |
145 return rsboi_spsm(v1,v2,RSB_TRANSPOSITION_N); | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
146 @@ -1500,7 +1518,7 @@ |
4184 | 147 DEFBINOP(trans_c_ldiv, sparse_rsb_mtx, matrix) |
148 { | |
149 RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG); | |
150 - CAST_BINOP_ARGS (const octave_sparsersb_mtx&, const octave_complex_matrix&); | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
151 + RSB_CAST_BINOP_ARGS (const octave_sparsersb_mtx&, const octave_complex_matrix&); |
4184 | 152 if(v1.is__triangular()) |
153 return rsboi_spsm(v1,v2,RSB_TRANSPOSITION_T); | |
154 | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
155 @@ -1539,7 +1557,7 @@ |
4184 | 156 #if RSBOI_WANT_DOUBLE_COMPLEX |
157 DEFBINOP(rsb_c_div, sparse_rsb_mtx, complex) | |
158 { | |
159 - CAST_BINOP_ARGS (const octave_sparsersb_mtx &, const octave_complex&); | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
160 + RSB_CAST_BINOP_ARGS (const octave_sparsersb_mtx &, const octave_complex&); |
4184 | 161 RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG); |
162 return v1.rsboi_get_scaled_copy_inv(v2.complex_value()); | |
163 } | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
164 @@ -1547,14 +1565,14 @@ |
4184 | 165 |
166 DEFBINOP(rsb_s_div, sparse_rsb_mtx, scalar) | |
167 { | |
168 - CAST_BINOP_ARGS (const octave_sparsersb_mtx &, const octave_scalar&); | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
169 + RSB_CAST_BINOP_ARGS (const octave_sparsersb_mtx &, const octave_scalar&); |
4184 | 170 RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG); |
171 return v1.rsboi_get_scaled_copy_inv(v2.scalar_value()); | |
172 } | |
173 | |
174 DEFBINOP(rsb_s_mul, sparse_rsb_mtx, scalar) | |
175 { | |
176 - CAST_BINOP_ARGS (const octave_sparsersb_mtx &, const octave_scalar&); | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
177 + RSB_CAST_BINOP_ARGS (const octave_sparsersb_mtx &, const octave_scalar&); |
4184 | 178 RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG); |
179 return v1.rsboi_get_scaled_copy(v2.scalar_value()); | |
180 } | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
181 @@ -1562,7 +1580,7 @@ |
4184 | 182 #if RSBOI_WANT_DOUBLE_COMPLEX |
183 DEFBINOP(rsb_c_mul, sparse_rsb_mtx, complex) | |
184 { | |
185 - CAST_BINOP_ARGS (const octave_sparsersb_mtx &, const octave_complex&); | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
186 + RSB_CAST_BINOP_ARGS (const octave_sparsersb_mtx &, const octave_complex&); |
4184 | 187 RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG); |
188 return v1.rsboi_get_scaled_copy(v2.complex_value()); | |
189 } | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
190 @@ -1571,7 +1589,7 @@ |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
191 #if 0 |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
192 DEFBINOP(rsb_s_pow, sparse_rsb_mtx, scalar) |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
193 { |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
194 - CAST_BINOP_ARGS (const octave_sparsersb_mtx &, const octave_scalar&); |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
195 + RSB_CAST_BINOP_ARGS (const octave_sparsersb_mtx &, const octave_scalar&); |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
196 RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG); |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
197 return v1.rsboi_get_power_copy(v2.scalar_value()); |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
198 } |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
199 @@ -1581,7 +1599,7 @@ |
4184 | 200 { |
201 rsb_err_t errval = RSB_ERR_NO_ERROR; | |
202 RSBOI_FIXME("I dunno how to trigger this!"); | |
203 - CAST_BINOP_ARGS (octave_sparsersb_mtx &, const octave_sparsersb_mtx&); | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
204 + RSB_CAST_BINOP_ARGS (octave_sparsersb_mtx &, const octave_sparsersb_mtx&); |
4184 | 205 RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG); |
206 //rsb_assign(v1.mtxAp, v2.mtxAp); | |
207 errval = rsb_mtx_clone(&v1.mtxAp,RSB_NUMERICAL_TYPE_SAME_TYPE,RSB_TRANSPOSITION_N,NULL,v2.mtxAp,RSBOI_EXPF); | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
208 @@ -1590,7 +1608,7 @@ |
4184 | 209 |
210 DEFASSIGNOP (assignm, sparse_rsb_mtx, matrix) | |
211 { | |
212 - CAST_BINOP_ARGS (octave_sparsersb_mtx &, const octave_matrix&); | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
213 + RSB_CAST_BINOP_ARGS (octave_sparsersb_mtx &, const octave_matrix&); |
4184 | 214 RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG); |
215 RSBOI_DESTROY(v1.mtxAp); | |
216 octave_value retval; | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
217 @@ -1605,7 +1623,7 @@ |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
218 #if 0 |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
219 DEFASSIGNOP(rsb_op_mul_eq_s, sparse_rsb_mtx, scalar) |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
220 { |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
221 - CAST_BINOP_ARGS (octave_sparsersb_mtx &, const octave_scalar&); |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
222 + RSB_CAST_BINOP_ARGS (octave_sparsersb_mtx &, const octave_scalar&); |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
223 octave_value retval; |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
224 RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG); |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
225 RSBOI_PERROR(v1.rsboi_scale(v2.scalar_value())); |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
226 @@ -1635,7 +1653,7 @@ |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
227 |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
228 DEFASSIGNOP(rsb_op_div_eq_s, sparse_rsb_mtx, scalar) |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
229 { |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
230 - CAST_BINOP_ARGS (octave_sparsersb_mtx &, const octave_scalar&); |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
231 + RSB_CAST_BINOP_ARGS (octave_sparsersb_mtx &, const octave_scalar&); |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
232 octave_value retval; |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
233 RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG); |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
234 RSBOI_PERROR(v1.rsboi_scale_inv(v2.scalar_value())); |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
235 @@ -1666,7 +1684,7 @@ |
4184 | 236 |
237 DEFBINOP(rsb_el_mul_s, sparse_rsb_mtx, scalar) | |
238 { | |
239 - CAST_BINOP_ARGS (const octave_sparsersb_mtx &, const octave_scalar&); | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
240 + RSB_CAST_BINOP_ARGS (const octave_sparsersb_mtx &, const octave_scalar&); |
4184 | 241 RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG); |
242 return v1.rsboi_get_scaled_copy(v2.scalar_value()); | |
243 } | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
244 @@ -1674,7 +1692,7 @@ |
4184 | 245 #if RSBOI_WANT_DOUBLE_COMPLEX |
246 DEFBINOP(rsb_el_mul_c, sparse_rsb_mtx, complex) | |
247 { | |
248 - CAST_BINOP_ARGS (const octave_sparsersb_mtx &, const octave_complex&); | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
249 + RSB_CAST_BINOP_ARGS (const octave_sparsersb_mtx &, const octave_complex&); |
4184 | 250 RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG); |
251 return v1.rsboi_get_scaled_copy(v2.complex_value()); | |
252 } | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
253 @@ -1682,7 +1700,7 @@ |
4184 | 254 |
255 DEFBINOP(rsb_el_div_s, sparse_rsb_mtx, scalar) | |
256 { | |
257 - CAST_BINOP_ARGS (const octave_sparsersb_mtx &, const octave_scalar&); | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
258 + RSB_CAST_BINOP_ARGS (const octave_sparsersb_mtx &, const octave_scalar&); |
4184 | 259 RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG); |
260 return v1.rsboi_get_scaled_copy_inv(v2.scalar_value()); | |
261 } | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
262 @@ -1690,7 +1708,7 @@ |
4184 | 263 #if RSBOI_WANT_DOUBLE_COMPLEX |
264 DEFBINOP(rsb_el_div_c, sparse_rsb_mtx, complex) | |
265 { | |
266 - CAST_BINOP_ARGS (const octave_sparsersb_mtx &, const octave_complex&); | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
267 + RSB_CAST_BINOP_ARGS (const octave_sparsersb_mtx &, const octave_complex&); |
4184 | 268 RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG); |
269 return v1.rsboi_get_scaled_copy_inv(v2.complex_value()); | |
270 } | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
271 @@ -1700,7 +1718,7 @@ |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
272 #if 0 |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
273 DEFASSIGNOP(rsb_op_el_div_eq, sparse_rsb_mtx, scalar) |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
274 { |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
275 - CAST_BINOP_ARGS (const octave_sparsersb_mtx &, const octave_scalar&); |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
276 + RSB_CAST_BINOP_ARGS (const octave_sparsersb_mtx &, const octave_scalar&); |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
277 std::cout << "rsb_op_el_div_eq!\n"; |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
278 RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG); |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
279 return v1.rsboi_get_scaled_copy_inv(v2.complex_value()); |
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
280 @@ -1710,21 +1728,21 @@ |
4184 | 281 DEFASSIGNOP(rsb_op_el_mul_eq_sc, sparse_rsb_mtx, matrix) |
282 { | |
283 rsb_err_t errval = RSB_ERR_NO_ERROR; | |
284 - CAST_BINOP_ARGS (octave_sparsersb_mtx &, const octave_matrix&); | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
285 + RSB_CAST_BINOP_ARGS (octave_sparsersb_mtx &, const octave_matrix&); |
4184 | 286 return v1.scale_rows(v2,false); |
287 } | |
288 | |
289 DEFASSIGNOP(rsb_op_el_div_eq_sc, sparse_rsb_mtx, matrix) | |
290 { | |
291 rsb_err_t errval = RSB_ERR_NO_ERROR; | |
292 - CAST_BINOP_ARGS (octave_sparsersb_mtx &, const octave_matrix&); | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
293 + RSB_CAST_BINOP_ARGS (octave_sparsersb_mtx &, const octave_matrix&); |
4184 | 294 return v1.scale_rows(v2,true); |
295 } | |
296 #endif /* RSBOI_WANT_DOUBLE_COMPLEX */ | |
297 | |
298 DEFBINOP(el_pow, sparse_rsb_mtx, scalar) | |
299 { | |
300 - CAST_BINOP_ARGS (const octave_sparsersb_mtx &, const octave_scalar&); | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
301 + RSB_CAST_BINOP_ARGS (const octave_sparsersb_mtx &, const octave_scalar&); |
4184 | 302 RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG); |
303 RSBOI_T alpha=v2.scalar_value(); | |
304 return v1.cp_ubop(RSB_ELOPF_POW,&alpha); | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
305 @@ -1733,7 +1751,7 @@ |
4184 | 306 #ifdef RSB_FULLY_IMPLEMENTED |
307 DEFASSIGNOP (assigns, sparse_rsb_mtx, scalar) | |
308 { | |
309 - CAST_BINOP_ARGS (octave_sparsersb_mtx &, const octave_scalar&); | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
310 + RSB_CAST_BINOP_ARGS (octave_sparsersb_mtx &, const octave_scalar&); |
4184 | 311 RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG); |
312 v1.assign(idx, v2.matrix_value()); | |
313 RSBOI_WARN(RSBOI_O_MISSIMPERRMSG); | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
314 @@ -1744,28 +1762,28 @@ |
4184 | 315 DEFBINOP(op_sub, sparse_rsb_mtx, sparse_rsb_mtx) |
316 { | |
317 RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG); | |
318 - CAST_BINOP_ARGS (const octave_sparsersb_mtx&, const octave_sparsersb_mtx&); | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
319 + RSB_CAST_BINOP_ARGS (const octave_sparsersb_mtx&, const octave_sparsersb_mtx&); |
4184 | 320 return v1.rsboi_sppsp(&rsboi_mone[0],v2); |
321 } | |
322 | |
323 DEFBINOP(op_add, sparse_rsb_mtx, sparse_rsb_mtx) | |
324 { | |
325 RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG); | |
326 - CAST_BINOP_ARGS (const octave_sparsersb_mtx&, const octave_sparsersb_mtx&); | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
327 + RSB_CAST_BINOP_ARGS (const octave_sparsersb_mtx&, const octave_sparsersb_mtx&); |
4184 | 328 return v1.rsboi_sppsp(&rsboi_pone[0],v2); |
329 } | |
330 | |
331 DEFBINOP(op_spmul, sparse_rsb_mtx, sparse_rsb_mtx) | |
332 { | |
333 RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG); | |
334 - CAST_BINOP_ARGS (const octave_sparsersb_mtx&, const octave_sparsersb_mtx&); | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
335 + RSB_CAST_BINOP_ARGS (const octave_sparsersb_mtx&, const octave_sparsersb_mtx&); |
4184 | 336 return v1.rsboi_spmsp(v2); |
337 } | |
338 | |
339 DEFBINOP(op_mul, sparse_rsb_mtx, matrix) | |
340 { | |
341 RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG); | |
342 - CAST_BINOP_ARGS (const octave_sparsersb_mtx&, const octave_matrix&); | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
343 + RSB_CAST_BINOP_ARGS (const octave_sparsersb_mtx&, const octave_matrix&); |
4184 | 344 return v1.rsboi_spmm(v2, false); |
345 } | |
346 | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
347 @@ -1773,7 +1791,7 @@ |
4184 | 348 { |
349 // ".'*" operator | |
350 RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG); | |
351 - CAST_BINOP_ARGS (const octave_sparsersb_mtx&, const octave_matrix&); | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
352 + RSB_CAST_BINOP_ARGS (const octave_sparsersb_mtx&, const octave_matrix&); |
4184 | 353 return v1.rsboi_spmm(v2, true); |
354 } | |
355 | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
356 @@ -1781,14 +1799,14 @@ |
4184 | 357 DEFBINOP(op_c_mul, sparse_rsb_mtx, matrix) |
358 { | |
359 RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG); | |
360 - CAST_BINOP_ARGS (const octave_sparsersb_mtx&, const octave_complex_matrix&); | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
361 + RSB_CAST_BINOP_ARGS (const octave_sparsersb_mtx&, const octave_complex_matrix&); |
4184 | 362 return v1.rsboi_spmm(v2, false); |
363 } | |
364 | |
365 DEFBINOP(op_c_trans_mul, sparse_rsb_mtx, matrix) | |
366 { | |
367 RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG); | |
368 - CAST_BINOP_ARGS (const octave_sparsersb_mtx&, const octave_complex_matrix&); | |
4185
b7c4178dadc4
sparsersb: update patch to latest from sparser repo, enable openmp
John D
parents:
4184
diff
changeset
|
369 + RSB_CAST_BINOP_ARGS (const octave_sparsersb_mtx&, const octave_complex_matrix&); |
4184 | 370 return v1.rsboi_spmm(v2, true); |
371 } | |
372 #endif /* RSBOI_WANT_DOUBLE_COMPLEX */ |