GNU Octave  9.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
bsxfun-decl.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (C) 2009-2024 The Octave Project Developers
4 //
5 // See the file COPYRIGHT.md in the top-level directory of this
6 // distribution or <https://octave.org/copyright/>.
7 //
8 // This file is part of Octave.
9 //
10 // Octave is free software: you can redistribute it and/or modify it
11 // under the terms of the GNU General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // Octave is distributed in the hope that it will be useful, but
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU General Public License for more details.
19 //
20 // You should have received a copy of the GNU General Public License
21 // along with Octave; see the file COPYING. If not, see
22 // <https://www.gnu.org/licenses/>.
23 //
24 ////////////////////////////////////////////////////////////////////////
25 
26 #if ! defined (octave_bsxfun_decl_h)
27 #define octave_bsxfun_decl_h 1
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