GNU Octave  4.2.1
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-2017 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 #include "octave-config.h"
28 
29 #define BSXFUN_OP_DECL(OP, ARRAY, API) \
30  extern API ARRAY bsxfun_ ## OP (const ARRAY&, const ARRAY&);
31 
32 #define BSXFUN_OP2_DECL(OP, ARRAY, ARRAY1, ARRAY2, API) \
33  extern API ARRAY bsxfun_ ## OP (const ARRAY1&, const ARRAY2&);
34 
35 #define BSXFUN_REL_DECL(OP, ARRAY, API) \
36  extern API boolNDArray bsxfun_ ## OP (const ARRAY&, const ARRAY&);
37 
38 #define BSXFUN_STDOP_DECLS(ARRAY, API) \
39  BSXFUN_OP_DECL (add, ARRAY, API) \
40  BSXFUN_OP_DECL (sub, ARRAY, API) \
41  BSXFUN_OP_DECL (mul, ARRAY, API) \
42  BSXFUN_OP_DECL (div, ARRAY, API) \
43  BSXFUN_OP_DECL (pow, ARRAY, API) \
44  BSXFUN_OP_DECL (min, ARRAY, API) \
45  BSXFUN_OP_DECL (max, ARRAY, API)
46 
47 #define BSXFUN_MIXED_INT_DECLS(INT_TYPE, API) \
48  BSXFUN_OP2_DECL (pow, INT_TYPE, INT_TYPE, NDArray, API) \
49  BSXFUN_OP2_DECL (pow, INT_TYPE, INT_TYPE, FloatNDArray, API) \
50  BSXFUN_OP2_DECL (pow, INT_TYPE, NDArray, INT_TYPE, API) \
51  BSXFUN_OP2_DECL (pow, INT_TYPE, FloatNDArray, INT_TYPE, API)
52 
53 #define BSXFUN_STDREL_DECLS(ARRAY, API) \
54  BSXFUN_REL_DECL (eq, ARRAY, API) \
55  BSXFUN_REL_DECL (ne, ARRAY, API) \
56  BSXFUN_REL_DECL (lt, ARRAY, API) \
57  BSXFUN_REL_DECL (le, ARRAY, API) \
58  BSXFUN_REL_DECL (gt, ARRAY, API) \
59  BSXFUN_REL_DECL (ge, ARRAY, API)
60 
61 #endif