Mercurial > octave-nkf
comparison liboctave/MSparse-defs.h @ 10312:cbc402e64d83
untabify liboctave header files
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 11 Feb 2010 12:14:48 -0500 |
parents | 4c0cdbe0acca |
children | 12884915a8e4 |
comparison
equal
deleted
inserted
replaced
10311:a217e1d74353 | 10312:cbc402e64d83 |
---|---|
104 F LTGT (const X_T&, const Y_T&) | 104 F LTGT (const X_T&, const Y_T&) |
105 | 105 |
106 // All the binary operators that we care about. We have two | 106 // All the binary operators that we care about. We have two |
107 // sets of macros since the MArray OP MArray operations use functions | 107 // sets of macros since the MArray OP MArray operations use functions |
108 // (product and quotient) instead of operators (*, /). | 108 // (product and quotient) instead of operators (*, /). |
109 #define SPARSE_BINOP_DECLS(A_T, F_T, E_T, PFX, API, LTGT, X_T, Y_T) \ | 109 #define SPARSE_BINOP_DECLS(A_T, F_T, E_T, PFX, API, LTGT, X_T, Y_T) \ |
110 SPARSE_BINOP_DECL (F_T, E_T, operator +, PFX, API, LTGT, X_T, Y_T); \ | 110 SPARSE_BINOP_DECL (F_T, E_T, operator +, PFX, API, LTGT, X_T, Y_T); \ |
111 SPARSE_BINOP_DECL (F_T, E_T, operator -, PFX, API, LTGT, X_T, Y_T); \ | 111 SPARSE_BINOP_DECL (F_T, E_T, operator -, PFX, API, LTGT, X_T, Y_T); \ |
112 SPARSE_BINOP_DECL (A_T, E_T, operator *, PFX, API, LTGT, X_T, Y_T); \ | 112 SPARSE_BINOP_DECL (A_T, E_T, operator *, PFX, API, LTGT, X_T, Y_T); \ |
113 SPARSE_BINOP_DECL (A_T, E_T, operator /, PFX, API, LTGT, X_T, Y_T); | 113 SPARSE_BINOP_DECL (A_T, E_T, operator /, PFX, API, LTGT, X_T, Y_T); |
114 | 114 |
118 SPARSE_BINOP_DECL (A_T, E_T, quotient, PFX, API, LTGT, A_T<E_T>, A_T<E_T>); \ | 118 SPARSE_BINOP_DECL (A_T, E_T, quotient, PFX, API, LTGT, A_T<E_T>, A_T<E_T>); \ |
119 SPARSE_BINOP_DECL (A_T, E_T, product, PFX, API, LTGT, A_T<E_T>, A_T<E_T>); | 119 SPARSE_BINOP_DECL (A_T, E_T, product, PFX, API, LTGT, A_T<E_T>, A_T<E_T>); |
120 | 120 |
121 // Generate forward declarations for binary operators. | 121 // Generate forward declarations for binary operators. |
122 #define SPARSE_BINOP_FWD_DECLS(A_T, F_T, API) \ | 122 #define SPARSE_BINOP_FWD_DECLS(A_T, F_T, API) \ |
123 SPARSE_BINOP_DECLS (A_T, F_T, T, template <typename T>, API, , A_T<T>, T) \ | 123 SPARSE_BINOP_DECLS (A_T, F_T, T, template <typename T>, API, , A_T<T>, T) \ |
124 SPARSE_BINOP_DECLS (A_T, F_T, T, template <typename T>, API, , T, A_T<T>) \ | 124 SPARSE_BINOP_DECLS (A_T, F_T, T, template <typename T>, API, , T, A_T<T>) \ |
125 SPARSE_AA_BINOP_DECLS (A_T, T, template <typename T>, API, ) | 125 SPARSE_AA_BINOP_DECLS (A_T, T, template <typename T>, API, ) |
126 | 126 |
127 // Generate friend declarations for the binary operators. | 127 // Generate friend declarations for the binary operators. |
128 #define SPARSE_BINOP_FRIENDS(A_T, F_T, API) \ | 128 #define SPARSE_BINOP_FRIENDS(A_T, F_T, API) \ |
129 SPARSE_BINOP_DECLS (A_T, F_T, T, friend, API, <>, A_T<T>, T) \ | 129 SPARSE_BINOP_DECLS (A_T, F_T, T, friend, API, <>, A_T<T>, T) \ |
130 SPARSE_BINOP_DECLS (A_T, F_T, T, friend, API, <>, T, A_T<T>) \ | 130 SPARSE_BINOP_DECLS (A_T, F_T, T, friend, API, <>, T, A_T<T>) \ |
131 SPARSE_AA_BINOP_DECLS (A_T, T, friend, API, <>) | 131 SPARSE_AA_BINOP_DECLS (A_T, T, friend, API, <>) |
132 | 132 |
133 // Instantiate the binary operators. | 133 // Instantiate the binary operators. |
134 #define SPARSE_BINOP_DEFS(A_T, F_T, E_T, API) \ | 134 #define SPARSE_BINOP_DEFS(A_T, F_T, E_T, API) \ |
135 SPARSE_BINOP_DECLS (A_T, F_T, E_T, template, API, , A_T<E_T>, E_T) \ | 135 SPARSE_BINOP_DECLS (A_T, F_T, E_T, template, API, , A_T<E_T>, E_T) \ |
136 SPARSE_BINOP_DECLS (A_T, F_T, E_T, template, API, , E_T, A_T<E_T>) \ | 136 SPARSE_BINOP_DECLS (A_T, F_T, E_T, template, API, , E_T, A_T<E_T>) \ |
137 SPARSE_AA_BINOP_DECLS (A_T, E_T, template, API, ) | 137 SPARSE_AA_BINOP_DECLS (A_T, E_T, template, API, ) |
138 | 138 |
139 // A function that can be used to forward binary operations from derived | 139 // A function that can be used to forward binary operations from derived |
140 // classes back to us. | 140 // classes back to us. |
141 #define SPARSE_BINOP_FWD_FCN(R, F, T, C_X, X_T, C_Y, Y_T) \ | 141 #define SPARSE_BINOP_FWD_FCN(R, F, T, C_X, X_T, C_Y, Y_T) \ |
186 SPARSE_UNOP_DEFS (MSparse, T, API) \ | 186 SPARSE_UNOP_DEFS (MSparse, T, API) \ |
187 SPARSE_BINOP_DEFS (MSparse, MArray2, T, API) | 187 SPARSE_BINOP_DEFS (MSparse, MArray2, T, API) |
188 | 188 |
189 // Define all the MSparse forwarding functions for return type R and | 189 // Define all the MSparse forwarding functions for return type R and |
190 // MSparse element type T | 190 // MSparse element type T |
191 #define SPARSE_FORWARD_DEFS(B, R, F, T) \ | 191 #define SPARSE_FORWARD_DEFS(B, R, F, T) \ |
192 /* SPARSE_OP_ASSIGN_FWD_DEFS */ \ | 192 /* SPARSE_OP_ASSIGN_FWD_DEFS */ \ |
193 /* (R, T, dynamic_cast<B<T>&>, R, , T) */ \ | 193 /* (R, T, dynamic_cast<B<T>&>, R, , T) */ \ |
194 \ | 194 \ |
195 SPARSE_OP_ASSIGN_FWD_DEFS \ | 195 SPARSE_OP_ASSIGN_FWD_DEFS \ |
196 (R, T, \ | 196 (R, T, \ |
197 dynamic_cast<B<T>&>, R, dynamic_cast<const B<T>&>, R) \ | 197 dynamic_cast<B<T>&>, R, dynamic_cast<const B<T>&>, R) \ |
198 \ | 198 \ |
201 \ | 201 \ |
202 SPARSE_BINOP_FWD_DEFS \ | 202 SPARSE_BINOP_FWD_DEFS \ |
203 (R, F, T, dynamic_cast<const B<T>&>, R, , T) \ | 203 (R, F, T, dynamic_cast<const B<T>&>, R, , T) \ |
204 \ | 204 \ |
205 SPARSE_BINOP_FWD_DEFS \ | 205 SPARSE_BINOP_FWD_DEFS \ |
206 (R, F, T, , T, dynamic_cast<const B<T>&>, R) \ | 206 (R, F, T, , T, dynamic_cast<const B<T>&>, R) \ |
207 \ | 207 \ |
208 SPARSE_AA_BINOP_FWD_DEFS \ | 208 SPARSE_AA_BINOP_FWD_DEFS \ |
209 (R, T, dynamic_cast<const B<T>&>, R, dynamic_cast<const B<T>&>, R) | 209 (R, T, dynamic_cast<const B<T>&>, R, dynamic_cast<const B<T>&>, R) |
210 | 210 |
211 // Now we have all the definitions we need. | 211 // Now we have all the definitions we need. |