Mercurial > hg > octave-nkf
annotate liboctave/mx-defs.h @ 10396:a0b51ac0f88a
optimize accumdim with summation
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Fri, 05 Mar 2010 12:31:30 +0100 |
parents | 4c0cdbe0acca |
children | fd0a3ac60b0e |
rev | line source |
---|---|
460 | 1 /* |
2 | |
8920 | 3 Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000, 2003, 2005, 2007, 2008 |
7017 | 4 John W. Eaton |
460 | 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. | |
460 | 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/>. | |
460 | 21 |
22 */ | |
23 | |
24 #if !defined (octave_mx_defs_h) | |
25 #define octave_mx_defs_h 1 | |
26 | |
27 // Classes we declare. | |
28 | |
29 class Matrix; | |
1574 | 30 class ComplexMatrix; |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
31 class FloatMatrix; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
32 class FloatComplexMatrix; |
2828 | 33 class boolMatrix; |
1574 | 34 class charMatrix; |
35 | |
4543 | 36 class NDArray; |
37 class ComplexNDArray; | |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
38 class FloatNDArray; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
39 class FloatComplexNDArray; |
4543 | 40 class boolNDArray; |
41 class charNDArray; | |
42 | |
460 | 43 class ColumnVector; |
1574 | 44 class ComplexColumnVector; |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
45 class FloatColumnVector; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
46 class FloatComplexColumnVector; |
1574 | 47 |
460 | 48 class RowVector; |
1574 | 49 class ComplexRowVector; |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
50 class FloatRowVector; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
51 class FloatComplexRowVector; |
1574 | 52 |
460 | 53 class DiagMatrix; |
54 class ComplexDiagMatrix; | |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
55 class FloatDiagMatrix; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
56 class FloatComplexDiagMatrix; |
1574 | 57 |
8367
445d27d79f4e
support permutation matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
8335
diff
changeset
|
58 class PermMatrix; |
445d27d79f4e
support permutation matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
8335
diff
changeset
|
59 |
460 | 60 class AEPBALANCE; |
61 class ComplexAEPBALANCE; | |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
62 class FloatAEPBALANCE; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
63 class FloatComplexAEPBALANCE; |
1574 | 64 |
460 | 65 class GEPBALANCE; |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
66 class ComplexGEPBALANCE; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
67 class FloatGEPBALANCE; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
68 class FloatComplexGEPBALANCE; |
1574 | 69 |
460 | 70 class CHOL; |
71 class ComplexCHOL; | |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
72 class FloatCHOL; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
73 class FloatComplexCHOL; |
1574 | 74 |
460 | 75 class EIG; |
1574 | 76 |
460 | 77 class HESS; |
78 class ComplexHESS; | |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
79 class FloatHESS; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
80 class FloatComplexHESS; |
1574 | 81 |
460 | 82 class SCHUR; |
83 class ComplexSCHUR; | |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
84 class FloatSCHUR; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
85 class FloatComplexSCHUR; |
1574 | 86 |
460 | 87 class SVD; |
88 class ComplexSVD; | |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
89 class FloatSVD; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
90 class FloatComplexSVD; |
1574 | 91 |
460 | 92 class LU; |
93 class ComplexLU; | |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
94 class FloatLU; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
95 class FloatComplexLU; |
1574 | 96 |
460 | 97 class QR; |
98 class ComplexQR; | |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
99 class FloatQR; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
100 class FloatComplexQR; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
101 |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
102 class QRP; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
103 class ComplexQRP; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
104 class FloatQRP; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
105 class FloatComplexQRP; |
460 | 106 |
107 // Other data types we use but that don't always need to have full | |
108 // declarations. | |
109 | |
1649 | 110 #include "oct-cmplx.h" |
460 | 111 |
112 #ifndef MAPPER_FCN_TYPEDEFS | |
113 #define MAPPER_FCN_TYPEDEFS 1 | |
114 | |
3248 | 115 typedef bool (*b_d_Mapper)(double); |
116 typedef bool (*b_c_Mapper)(const Complex&); | |
117 | |
460 | 118 typedef double (*d_d_Mapper)(double); |
119 typedef double (*d_c_Mapper)(const Complex&); | |
120 typedef Complex (*c_c_Mapper)(const Complex&); | |
121 | |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
122 typedef bool (*b_f_Mapper)(float); |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
123 typedef bool (*b_fc_Mapper)(const FloatComplex&); |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
124 |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
125 typedef float (*f_f_Mapper)(float); |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
126 typedef float (*f_fc_Mapper)(const FloatComplex&); |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
127 typedef FloatComplex (*fc_fc_Mapper)(const FloatComplex&); |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
128 |
9661
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
129 enum blas_trans_type |
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
130 { |
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
131 blas_no_trans = 'N', |
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
132 blas_trans = 'T', |
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
133 blas_conj_trans = 'C' |
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
134 }; |
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
135 |
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
136 inline char |
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
137 get_blas_char (blas_trans_type transt) |
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
138 { |
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
139 return static_cast<char> (transt); |
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
140 } |
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
141 |
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
142 |
460 | 143 #endif |
144 | |
145 #endif |