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
bsxfun-decl.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 2009-2015 Jaroslav Hajek
4 Copyright (C) 2009 VZLU Prague
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_bsxfun_decl_h)
25 #define octave_bsxfun_decl_h 1
26 
27 #define BSXFUN_OP_DECL(OP, ARRAY, API) \
28 extern API ARRAY bsxfun_ ## OP (const ARRAY&, const ARRAY&);
29 
30 #define BSXFUN_OP2_DECL(OP, ARRAY, ARRAY1, ARRAY2, API) \
31 extern API ARRAY bsxfun_ ## OP (const ARRAY1&, const ARRAY2&);
32 
33 #define BSXFUN_REL_DECL(OP, ARRAY, API) \
34 extern API boolNDArray bsxfun_ ## OP (const ARRAY&, const ARRAY&);
35 
36 #define BSXFUN_STDOP_DECLS(ARRAY, API) \
37  BSXFUN_OP_DECL (add, ARRAY, API) \
38  BSXFUN_OP_DECL (sub, ARRAY, API) \
39  BSXFUN_OP_DECL (mul, ARRAY, API) \
40  BSXFUN_OP_DECL (div, ARRAY, API) \
41  BSXFUN_OP_DECL (pow, ARRAY, API) \
42  BSXFUN_OP_DECL (min, ARRAY, API) \
43  BSXFUN_OP_DECL (max, ARRAY, API)
44 
45 #define BSXFUN_MIXED_INT_DECLS(INT_TYPE, API) \
46  BSXFUN_OP2_DECL (pow, INT_TYPE, INT_TYPE, NDArray, API) \
47  BSXFUN_OP2_DECL (pow, INT_TYPE, INT_TYPE, FloatNDArray, API) \
48  BSXFUN_OP2_DECL (pow, INT_TYPE, NDArray, INT_TYPE, API) \
49  BSXFUN_OP2_DECL (pow, INT_TYPE, FloatNDArray, INT_TYPE, API)
50 
51 #define BSXFUN_STDREL_DECLS(ARRAY, API) \
52  BSXFUN_REL_DECL (eq, ARRAY, API) \
53  BSXFUN_REL_DECL (ne, ARRAY, API) \
54  BSXFUN_REL_DECL (lt, ARRAY, API) \
55  BSXFUN_REL_DECL (le, ARRAY, API) \
56  BSXFUN_REL_DECL (gt, ARRAY, API) \
57  BSXFUN_REL_DECL (ge, ARRAY, API)
58 
59 #endif