SHOGUN  6.1.3
LinalgMacros.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016, Shogun-Toolbox e.V. <shogun-team@shogun-toolbox.org>
3  * All rights reserved.
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions are met:
6  *
7  * 1. Redistributions of source code must retain the above copyright notice,
8  * this list of conditions and the following disclaimer.
9  *
10  * 2. Redistributions in binary form must reproduce the above copyright
11  * notice, this list of conditions and the following disclaimer in the
12  * documentation and/or other materials provided with the distribution.
13  *
14  * 3. Neither the name of the copyright holder nor the names of its
15  * contributors may be used to endorse or promote products derived from
16  * this software without specific prior written permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28  * POSSIBILITY OF SUCH DAMAGE.
29  *
30  * Authors: 2016 Pan Deng, Soumyajit De, Heiko Strathmann, Viktor Gal
31  */
32 
33 #define DEFINE_FOR_ALL_PTYPE(METHODNAME, Container) \
34  METHODNAME(bool, Container); \
35  METHODNAME(char, Container); \
36  METHODNAME(int8_t, Container); \
37  METHODNAME(uint8_t, Container); \
38  METHODNAME(int16_t, Container); \
39  METHODNAME(uint16_t, Container); \
40  METHODNAME(int32_t, Container); \
41  METHODNAME(uint32_t, Container); \
42  METHODNAME(int64_t, Container); \
43  METHODNAME(uint64_t, Container); \
44  METHODNAME(float32_t, Container); \
45  METHODNAME(float64_t, Container); \
46  METHODNAME(floatmax_t, Container); \
47  METHODNAME(complex128_t, Container);
48 
49 #define DEFINE_FOR_REAL_PTYPE(METHODNAME, Container) \
50  METHODNAME(bool, Container); \
51  METHODNAME(char, Container); \
52  METHODNAME(int8_t, Container); \
53  METHODNAME(uint8_t, Container); \
54  METHODNAME(int16_t, Container); \
55  METHODNAME(uint16_t, Container); \
56  METHODNAME(int32_t, Container); \
57  METHODNAME(uint32_t, Container); \
58  METHODNAME(int64_t, Container); \
59  METHODNAME(uint64_t, Container); \
60  METHODNAME(float32_t, Container); \
61  METHODNAME(float64_t, Container); \
62  METHODNAME(floatmax_t, Container);
63 
64 #define DEFINE_FOR_NON_INTEGER_PTYPE(METHODNAME, Container) \
65  METHODNAME(float32_t, Container); \
66  METHODNAME(float64_t, Container); \
67  METHODNAME(floatmax_t, Container); \
68  METHODNAME(complex128_t, Container);
69 
70 #define DEFINE_FOR_NON_INTEGER_REAL_PTYPE(METHODNAME, Container) \
71  METHODNAME(float32_t, Container); \
72  METHODNAME(float64_t, Container); \
73  METHODNAME(floatmax_t, Container);
74 
75 #define DEFINE_FOR_NUMERIC_PTYPE(METHODNAME, Container) \
76  METHODNAME(char, Container); \
77  METHODNAME(int8_t, Container); \
78  METHODNAME(uint8_t, Container); \
79  METHODNAME(int16_t, Container); \
80  METHODNAME(uint16_t, Container); \
81  METHODNAME(int32_t, Container); \
82  METHODNAME(uint32_t, Container); \
83  METHODNAME(int64_t, Container); \
84  METHODNAME(uint64_t, Container); \
85  METHODNAME(float32_t, Container); \
86  METHODNAME(float64_t, Container); \
87  METHODNAME(floatmax_t, Container);

SHOGUN Machine Learning Toolbox - Documentation