GNU Octave  4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MArray-defs.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 1996-2015 John W. Eaton
4 Copyright (C) 2009 VZLU Prague, a.s.
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
10 Free Software Foundation; either version 3 of the License, or (at your
11 option) any later version.
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
19 along with Octave; see the file COPYING. If not, see
20 <http://www.gnu.org/licenses/>.
21 
22 */
23 
24 #if !defined (octave_MArray_defs_h)
25 #define octave_MArray_defs_h 1
26 
27 #include "mx-inlines.cc"
28 
29 // Instantiate the OP= operators.
30 #define MARRAY_OP_ASSIGN_DEFS(A_T, E_T, RHS_T, API) \
31  MARRAY_OP_ASSIGN_DECLS (A_T, E_T, template, API, , RHS_T)
32 
33 #define MARRAY_OP_ASSIGN_DEFS1(A_T, E_T, RHS_T, API) \
34  MARRAY_OP_ASSIGN_DECLS1 (A_T, E_T, template, API, , RHS_T)
35 
36 // Instantiate the unary operators.
37 #define MARRAY_UNOP_DEFS(A_T, E_T, API) \
38  MARRAY_UNOP_DECLS (A_T, E_T, template, API, )
39 
40 // Instantiate the binary operators.
41 #define MARRAY_BINOP_DEFS(A_T, E_T, API) \
42  MARRAY_BINOP_DECLS (A_T, E_T, template, API, , A_T<E_T>, E_T) \
43  MARRAY_BINOP_DECLS (A_T, E_T, template, API, , E_T, A_T<E_T>) \
44  MARRAY_AA_BINOP_DECLS (A_T, E_T, template, API, )
45 
46 #define MDIAGARRAY2_BINOP_DEFS(A_T, E_T, API) \
47  MDIAGARRAY2_DAS_BINOP_DECLS (A_T, E_T, template, API, , A_T<E_T>, E_T) \
48  MDIAGARRAY2_SDA_BINOP_DECLS (A_T, E_T, template, API, , E_T, A_T<E_T>) \
49  MDIAGARRAY2_DADA_BINOP_DECLS (A_T, E_T, template, API, )
50 
51 // The following macros are for external use.
52 
53 // Instantiate all the MArray friends for MArray element type T.
54 #define INSTANTIATE_MARRAY_FRIENDS(T, API) \
55  MARRAY_OP_ASSIGN_DEFS1 (MArray, T, T, API) \
56  MARRAY_OP_ASSIGN_DEFS (MArray, T, MArray<T>, API) \
57  MARRAY_UNOP_DEFS (MArray, T, API) \
58  MARRAY_BINOP_DEFS (MArray, T, API)
59 
60 // Instantiate all the MDiagArray2 friends for MDiagArray2 element type T.
61 #define INSTANTIATE_MDIAGARRAY2_FRIENDS(T, API) \
62  MARRAY_UNOP_DEFS (MDiagArray2, T, API) \
63  MDIAGARRAY2_BINOP_DEFS (MDiagArray2, T, API)
64 
65 // Now we have all the definitions we need.
66 
67 #endif