20 #ifndef SELDON_FILE_BAND_MATRIX_INLINE_CXX
22 #include "BandMatrix.hxx"
33 template <
class T,
class Prop,
class Storage,
class Allocator>
41 template <
class T,
class Prop,
class Storage,
class Allocator>
49 template <
class T,
class Prop,
class Storage,
class Allocator>
57 template <
class T,
class Prop,
class Storage,
class Allocator>
65 template <
class T,
class Prop,
class Storage,
class Allocator>
68 return data_.GetDataSize();
73 template <
class T,
class Prop,
class Storage,
class Allocator>
76 return sizeof(*this) + data_.GetMemorySize() -
sizeof(data_);
81 template <
class T,
class Prop,
class Storage,
class Allocator>
89 template <
class T,
class Prop,
class Storage,
class Allocator>
96 template <
class T,
class Prop,
class Storage,
class Allocator>
100 Reallocate(m, n, 0, 0);
105 template <
class T,
class Prop,
class Storage,
class Allocator>
108 return data_.GetData();
113 template <
class T,
class Prop,
class Storage,
class Allocator>
123 template <
class T,
class Prop,
class Storage,
class Allocator>
131 template <
class T,
class Prop,
class Storage,
class Allocator>
139 template <
class T,
class Prop,
class Storage,
class Allocator>
148 template <
class T,
class Prop,
class Storage,
class Allocator>
156 #ifdef SELDON_WITH_VIRTUAL
157 template <
class T,
class Prop,
class Storage,
class Allocator>
160 const typename ClassComplexType<T>::Treal& omega,
161 int nb_iter,
int stage_ssor)
const
164 x, r, omega, nb_iter, stage_ssor);
167 template <
class T,
class Prop,
class Storage,
class Allocator>
168 inline void Matrix_Band<T, Prop, Storage, Allocator>
169 ::ApplySor(
const SeldonTranspose& trans, Vector<Tcplx>& x,
const Vector<Tcplx>& r,
170 const typename ClassComplexType<T>::Treal& omega,
171 int nb_iter,
int stage_ssor)
const
174 static_cast<const Matrix<T, Prop, Storage, Allocator>&
>(*
this),
175 x, r, omega, nb_iter, stage_ssor);
178 template <
class T,
class Prop,
class Storage,
class Allocator>
179 inline void Matrix_Band<T, Prop, Storage, Allocator>
180 ::MltAddVector(
const Treal& alpha,
const Vector<Treal>& x,
181 const Treal& beta, Vector<Treal>& y)
const
185 static_cast<const Matrix<T, Prop, Storage, Allocator>&
>(*
this),
189 template <
class T,
class Prop,
class Storage,
class Allocator>
190 inline void Matrix_Band<T, Prop, Storage, Allocator>
191 ::MltAddVector(
const Tcplx& alpha,
const Vector<Tcplx>& x,
192 const Tcplx& beta, Vector<Tcplx>& y)
const
196 static_cast<const Matrix<T, Prop, Storage, Allocator>&
>(*
this),
200 template <
class T,
class Prop,
class Storage,
class Allocator>
201 inline void Matrix_Band<T, Prop, Storage, Allocator>
202 ::MltAddVector(
const Treal& alpha,
const SeldonTranspose& trans,
203 const Vector<Treal>& x,
204 const Treal& beta, Vector<Treal>& y)
const
208 static_cast<const Matrix<T, Prop, Storage, Allocator>&
>(*
this),
212 template <
class T,
class Prop,
class Storage,
class Allocator>
213 inline void Matrix_Band<T, Prop, Storage, Allocator>
214 ::MltAddVector(
const Tcplx& alpha,
const SeldonTranspose& trans,
215 const Vector<Tcplx>& x,
216 const Tcplx& beta, Vector<Tcplx>& y)
const
220 static_cast<const Matrix<T, Prop, Storage, Allocator>&
>(*
this),
224 template <
class T,
class Prop,
class Storage,
class Allocator>
225 inline void Matrix_Band<T, Prop, Storage, Allocator>
226 ::MltVector(
const Vector<Treal>& x, Vector<Treal>& y)
const
228 Mlt(
static_cast<const Matrix<T, Prop, Storage, Allocator>&
>(*
this), x, y);
231 template <
class T,
class Prop,
class Storage,
class Allocator>
232 inline void Matrix_Band<T, Prop, Storage, Allocator>
233 ::MltVector(
const Vector<Tcplx>& x, Vector<Tcplx>& y)
const
235 Mlt(
static_cast<const Matrix<T, Prop, Storage, Allocator>&
>(*
this), x, y);
238 template <
class T,
class Prop,
class Storage,
class Allocator>
239 inline void Matrix_Band<T, Prop, Storage, Allocator>
240 ::MltVector(
const SeldonTranspose& trans,
241 const Vector<Treal>& x, Vector<Treal>& y)
const
244 static_cast<const Matrix<T, Prop, Storage, Allocator>&
>(*
this), x, y);
247 template <
class T,
class Prop,
class Storage,
class Allocator>
248 inline void Matrix_Band<T, Prop, Storage, Allocator>
249 ::MltVector(
const SeldonTranspose& trans,
250 const Vector<Tcplx>& x, Vector<Tcplx>& y)
const
253 static_cast<const Matrix<T, Prop, Storage, Allocator>&
>(*
this), x, y);
256 template <
class T,
class Prop,
class Storage,
class Allocator>
257 inline bool Matrix_Band<T, Prop, Storage, Allocator>
258 ::IsSymmetric()
const
271 template <
class T,
class Prop,
class Storage,
class Allocator>
279 template <
class T,
class Prop,
class Storage,
class Allocator>
282 return this->m_ + last_rows_.
GetM();
287 template <
class T,
class Prop,
class Storage,
class Allocator>
290 return this->n_ + last_columns_.
GetN();
295 template <
class T,
class Prop,
class Storage,
class Allocator>
298 return last_rows_.
GetM();
303 template <
class T,
class Prop,
class Storage,
class Allocator>
306 return last_columns_.
GetN();
311 template <
class T,
class Prop,
class Storage,
class Allocator>
314 return this->data_.
GetDataSize() + this->last_rows_.GetDataSize()
315 + this->last_columns_.GetDataSize() + this->last_block_.GetDataSize();
320 template <
class T,
class Prop,
class Storage,
class Allocator>
325 + last_block_.GetMemorySize();
330 template <
class T,
class Prop,
class Storage,
class Allocator>
337 template <
class T,
class Prop,
class Storage,
class Allocator>
340 Reallocate(m, n, 0, 0);
345 template <
class T,
class Prop,
class Storage,
class Allocator>
353 template <
class T,
class Prop,
class Storage,
class Allocator>
361 template <
class T,
class Prop,
class Storage,
class Allocator>
370 template <
class T,
class Prop,
class Storage,
class Allocator>
384 template<
class T0,
class T1,
class Prop1,
class Allocator1,
385 class T2,
class Prop2,
class Allocator2>
395 template<
class T,
class Allocator>
404 template<
class T,
class Allocator>
413 template<
class T,
class Allocator>
422 template<
class T0,
class T1,
class Allocator>
432 template<
class T0,
class T1,
class T,
class T2,
class Allocator>
433 inline void MltAddVector(
const T0& alpha,
438 A.
MltAdd(alpha, SeldonNoTrans, x, y);
443 template<
class T0,
class T1,
class T,
class T2,
class Allocator>
449 A.
MltAdd(alpha, trans, x, y);
454 template<
class T,
class Allocator,
class T1>
459 SetComplexZero(zero); SetComplexOne(one);
461 A.
MltAdd(one, SeldonNoTrans, x, y);
466 template<
class T,
class Allocator,
class T1>
472 SetComplexZero(zero); SetComplexOne(one);
474 A.
MltAdd(one, trans, x, y);
479 template<
class T0,
class T1,
class Allocator>
488 template<
class T,
class Allocator>
498 template<
class T,
class Allocator>
512 template<
class T,
class Allocator>
520 template<
class T,
class Allocator>
529 template<
class T,
class Allocator>
538 template<
class T0,
class T1,
class Prop1,
class Allocator1,
539 class T2,
class Prop2,
class Allocator2>
549 template<
class T0,
class T1,
class T,
class T2,
class Allocator>
550 inline void MltAddVector(
const T0& alpha,
555 A.
MltAdd(alpha, SeldonNoTrans, x, y);
560 template<
class T0,
class T1,
class T,
class T2,
class Allocator>
566 A.
MltAdd(alpha, trans, x, y);
571 template<
class T,
class Allocator,
class T1>
576 SetComplexZero(zero); SetComplexOne(one);
578 A.
MltAdd(one, SeldonNoTrans, x, y);
583 template<
class T,
class Allocator,
class T1>
589 SetComplexZero(zero); SetComplexOne(one);
591 A.
MltAdd(one, trans, x, y);
596 template<
class T0,
class T1,
class Allocator>
605 template<
class T,
class Allocator>
615 #define SELDON_FILE_BAND_MATRIX_INLINE_CXX