summaryrefslogtreecommitdiff
path: root/2.3-1/src/c/auxiliaryFunctions/interfaces/int_find.h
blob: ec1e157528ba87b5058178a49ced480d16f98ed1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
/*
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET
 *
 * This file must be used under the terms of the CeCILL.
 * This source file is licensed as described in the file COPYING, which
 * you should have received as part of this distribution.  The terms
 * are also available at
 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
 *
 */

/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */

#ifndef __INT_FIND_H__
#define __INT_FIND_H__

/* 1 input, 1 output */

#define s0finds0(in)				 		(in == 0) ? -1 : 1

#define d0findd0(in)						(in == 0) ? -1 : 1

#define c0finds0(in)						((creals(in) == 0) && (cimags(in) == 0)) ? -1 : 1

#define z0findd0(in)						((zreals(in) == 0) && (zimags(in) == 0)) ? -1 : 1

#define u80findu80(in)						(in == 0) ? -1 : 1

#define u160findu160(in)                                        (in == 0) ? -1 : 1

#define i80findi80(in)                                          (in == 0) ? -1 : 1

#define i160findi160(in)                                        (in == 0) ? -1 : 1

#define s2finds2(in,size,out)                   sfinda(in, size[0]*size[1], out, -1)

#define d2findd2(in,size,out)                   dfinda(in, size[0]*size[1], out, -1)

#define c2finds2(in,size,out)                   cfinda(in, size[0]*size[1], out, -1)

#define z2findd2(in,size,out)                   zfinda(in, size[0]*size[1], out, -1)

#define u82findu82(in,size,out)                 u8finda(in,size[0]*size[1],out, -1)

#define u162findu162(in,size,out)               u16finda(in,size[0]*size[1],out, -1)

#define i82findi82(in,size,out)                 i8finda(in,size[0]*size[1],out, -1)

#define i162findi162(in,size,out)               i16finda(in,size[0]*size[1],out, -1)

/* 1 input, 2 outputs */

#define s0finds0s0(in,out2)					*out2 = s0finds0(in);s0finds0(in)

#define d0findd0d0(in,out2)					*out2 = d0findd0(in);d0findd0(in)

#define c0finds0s0(in,out2)					if ((creals(in)==0) && (cimags(in)==0)) {out2=0;} else {out2=1;}

#define z0findd0d0(in,out2)					if ((zreals(in)==0) && (zimags(in)==0)) {out2=0;} else {out2=1;}

#define u80findu80u80(in,out2)                                  *out2 = u80findu80(in);u80findu80(in)

#define u160findu160u160(in,out2)                               *out2 = u160findu160(in);u160findu160(in)

#define i80findi80i80(in,out2)                                  *out2 = i80findi80(in);i80findi80(in)

#define i160findi160i160(in,out2)                               *out2 = i160findi160(in);i160findi160(in)


#define s2finds2s2(in,size,out1,sizeOut1,out2,sizeOut2)			sfind2da(in,size[0],size[1],out1,sizeOut1,out2,sizeOut2,-1)

#define d2findd2d2(in,size,out1,out2)                                   dfind2da(in,size[0],size[1],out1,out2,-1)

#define c2finds2s2(in,size,out1,sizeOut1,out2,sizeOut2)			cfind2da(in,size[0],size[1],out1,sizeOut1,out2,sizeOut2,-1)

#define z2finds2s2(in,size,out1,sizeOut1,out2,sizeOut2)			zfind2da(in,size[0],size[1],out1,sizeOut1,out2,sizeOut2,-1)

/* 2 inputs, 1 output */

#define s0s0finds0(in1,in2)					s0finds0(in1)

#define d0d0findd0(in1,in2)					d0findd0(in1)

#define c0s0finds0(in1,in2)					c0finds0(in1)

#define z0d0findd0(in1,in2)					z0findd0(in1)

#define u80u80findu80(in1,in2)                                  u80findu80(in1)

#define u160u160findu160(in1,in2)                               u160findu160(in1)

#define i80i80findi80(in1,in2)                                  i80findi80(in1)

#define i160i160findi160(in1,in2)                               i160findi160(in1)

#define s2s0finds2(in1,size,in2,out)			{\
 int temp_out_indice[2] = {0} ;\
 sfinda(in1,size[0]*size[1],out,in2);\
 }

#define d2d0findd2(in1,size,in2,out)			{\
 int temp_out_indice[2] = {0} ;\
 dfinda(in1,size[0]*size[1],out,in2);\
 }

#define c2s0finds2(in1,size,in2,out)			{\
 int temp_out_indice[2] = {0} ;\
 cfinda(in1,size[0]*size[1],out,in2);\
 }

#define z2d0findd2(in1,size,in2,out)			{\
 int temp_out_indice[2] = {0} ;\
 zfinda(in1,size[0]*size[1],out,in2);\
 }

#define u82u80findu82(in1,size,in2,out)                {\
 int temp_out_indice[2] = {0};\
 u8finda(in1,size[0]*size[1],out,in2);\
}

#define u162u160findu162(in1,size,in2,out)                {\
 int temp_out_indice[2] = {0};\
 u16finda(in1,size[0]*size[1],out,in2);\
}

#define i82i80findi82(in1,size,in2,out)                {\
 int temp_out_indice[2] = {0};\
 i8finda(in1,size[0]*size[1],out,in2);\
}

#define i162i160findi162(in1,size,in2,out)                {\
 int temp_out_indice[2] = {0};\
 i16finda(in1,size[0]*size[1],out,in2);\
}
/* 2 inputs, 2 outputs */

#define s0s0finds0s0(in1,in2,out1,out2)				s0finds0s0(in1,out1,out2)

#define d0d0findd0d0(in1,in2,out1,out2)				d0findd0d0(in1,out1,out2)

#define c0s0finds0s0(in1,in2,out1,out2)				c0finds0s0(in1,out1,out2)

#define z0d0findd0d0(in1,in2,out1,out2)				z0findd0d0(in1,out1,out2)

#define u80u80findu80u80(in1,in2,out1,out2)                     u80findu80u80(in1,out1,out2)

#define u160u160findu160u160(in1,in2,out1,out2)                 u160findu160u160(in1,out1,out2)

#define i80i80findi80i80(in1,in2,out1,out2)                     i80findi80i80(in1,out1,out2)

#define i160i60findi60i60(in1,in2,out1,out2)                    i60findi60i60(in1,out1,out2)


/*FIXME : prototypes are wrong*/
#define s2s0finds2s2(in1,size,in2,out1,out2)		{\
 int temp_out_indice1[2] = {0} ;\
 int temp_out_indice2[2] = {0} ;\
 sfind2da(in1,size[0],size[1],out1,temp_out_indice1,out2,temp_out_indice2,in2);\
 }

#define d2d0findd2d2(in1,size,in2,out1,out2)		{\
 int temp_out_indice1[2] = {0} ;\
 int temp_out_indice2[2] = {0} ;\
 dfind2da(in1,size[0],size[1],out1,temp_out_indice1,out2,temp_out_indice2,in2);\
 }


#define c2s0finds2s2(in1,size,in2,out1,out2)		{\
 int temp_out_indice1[2] = {0} ;\
 int temp_out_indice2[2] = {0} ;\
 cfind2da(in1,size[0],size[1],out1,temp_out_indice1,out2,temp_out_indice2,in2);\
 }

#define z2d0findd2d2(in1,size,in2,out1,out2)		{\
 int temp_out_indice1[2] = {0} ;\
 int temp_out_indice2[2] = {0} ;\
 zfind2da(in1,size[0],size[1],out1,temp_out_indice1,out2,temp_out_indice2,in2);\
 }



#endif /* !__INT_FIND_H__ */