Mercurial > hg > octave-nkf
annotate liboctave/MArray-C.cc @ 7793:96ba591be50f
Add some more support for single precision to libcruft functions
author | David Bateman <dbateman@free.fr> |
---|---|
date | Sun, 11 May 2008 22:51:50 +0200 |
parents | 82be108cc558 |
children | b11c31849b44 |
rev | line source |
---|---|
1212 | 1 /* |
2 | |
7017 | 3 Copyright (C) 1995, 1996, 1997, 2000, 2003, 2005, 2006, 2007 |
4 John W. Eaton | |
1212 | 5 |
6 This file is part of Octave. | |
7 | |
8 Octave is free software; you can redistribute it and/or modify it | |
9 under the terms of the GNU General Public License as published by the | |
7016 | 10 Free Software Foundation; either version 3 of the License, or (at your |
11 option) any later version. | |
1212 | 12 |
13 Octave is distributed in the hope that it will be useful, but WITHOUT | |
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
16 for more details. | |
17 | |
18 You should have received a copy of the GNU General Public License | |
7016 | 19 along with Octave; see the file COPYING. If not, see |
20 <http://www.gnu.org/licenses/>. | |
1212 | 21 |
22 */ | |
23 | |
2006 | 24 #ifdef HAVE_CONFIG_H |
25 #include <config.h> | |
26 #endif | |
27 | |
1212 | 28 // Instantiate MArrays of Complex values. |
29 | |
1989 | 30 #include "oct-cmplx.h" |
6508 | 31 #include "f77-fcn.h" |
32 | |
33 extern "C" | |
34 { | |
35 F77_RET_T | |
36 F77_FUNC (xdznrm2, XDZNRM2) (const octave_idx_type&, const Complex*, | |
37 const octave_idx_type&, double&); | |
38 } | |
1989 | 39 |
1212 | 40 #include "MArray.h" |
41 #include "MArray.cc" | |
42 | |
6508 | 43 template <> |
6693 | 44 OCTAVE_API double |
6508 | 45 MArray<Complex>::norm (double p) const |
46 { | |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
47 MARRAY_NORM_BODY (Complex, double, xdznrm2, XDZNRM2, octave_NaN); |
6508 | 48 } |
49 | |
6108 | 50 template class OCTAVE_API MArray<Complex>; |
1212 | 51 |
6708 | 52 INSTANTIATE_MARRAY_FRIENDS (Complex, OCTAVE_API) |
1989 | 53 |
54 #include "MArray2.h" | |
55 #include "MArray2.cc" | |
56 | |
6108 | 57 template class OCTAVE_API MArray2<Complex>; |
1989 | 58 |
6708 | 59 INSTANTIATE_MARRAY2_FRIENDS (Complex, OCTAVE_API) |
1989 | 60 |
4513 | 61 #include "MArrayN.h" |
62 #include "MArrayN.cc" | |
63 | |
6108 | 64 template class OCTAVE_API MArrayN<Complex>; |
4513 | 65 |
6708 | 66 INSTANTIATE_MARRAYN_FRIENDS (Complex, OCTAVE_API) |
4513 | 67 |
1989 | 68 #include "MDiagArray2.h" |
69 #include "MDiagArray2.cc" | |
70 | |
6108 | 71 template class OCTAVE_API MDiagArray2<Complex>; |
1989 | 72 |
6708 | 73 INSTANTIATE_MDIAGARRAY2_FRIENDS (Complex, OCTAVE_API) |
1212 | 74 |
75 /* | |
76 ;;; Local Variables: *** | |
77 ;;; mode: C++ *** | |
78 ;;; End: *** | |
79 */ |