File: all.c1 /* 2 * all.c 3 * 4 * Code generation for function 'all' 5 * 6 */ 7 8 /* Include files */ 9 #include "rt_nonfinite.h" 10 #include "gjbf.h" 11 #include "all.h" 12 #include "eml_int_forloop_overflow_check.h" 13 #include "gjbf_data.h" 14 #include "blas.h" 15 16 /* Variable Definitions */ 17 static emlrtRSInfo ib_emlrtRSI = { 12, "all", 18 "C:\\Program Files\\MATLAB\\R2016a\\toolbox\\eml\\lib\\matlab\\ops\\all.m" }; 19 20 static emlrtRSInfo jb_emlrtRSI = { 124, "allOrAny", 21 "C:\\Program Files\\MATLAB\\R2016a\\toolbox\\eml\\eml\\+coder\\+internal\\allOrAny.m" 22 }; 23 24 static emlrtRTEInfo q_emlrtRTEI = { 39, 19, "allOrAny", 25 "C:\\Program Files\\MATLAB\\R2016a\\toolbox\\eml\\eml\\+coder\\+internal\\allOrAny.m" 26 }; 27 28 static emlrtRTEInfo r_emlrtRTEI = { 42, 19, "allOrAny", 29 "C:\\Program Files\\MATLAB\\R2016a\\toolbox\\eml\\eml\\+coder\\+internal\\allOrAny.m" 30 }; 31 32 /* Function Definitions */ 33 void all(const emlrtStack *sp, const boolean_T x[14112], boolean_T y[16]) 34 { 35 int32_T i2; 36 int32_T iy; 37 int32_T i; 38 int32_T i1; 39 boolean_T exitg1; 40 emlrtStack st; 41 emlrtStack b_st; 42 emlrtStack c_st; 43 st.prev = sp; 44 st.tls = sp->tls; 45 st.site = &ib_emlrtRSI; 46 b_st.prev = &st; 47 b_st.tls = st.tls; 48 c_st.prev = &b_st; 49 c_st.tls = b_st.tls; 50 for (i2 = 0; i2 < 16; i2++) { 51 y[i2] = true; 52 } 53 54 i2 = 0; 55 iy = -1; 56 for (i = 0; i < 16; i++) { 57 i1 = i2 + 1; 58 i2 += 882; 59 iy++; 60 b_st.site = &jb_emlrtRSI; 61 if ((!(i1 > i2)) && (i2 > 2147483646)) { 62 c_st.site = &kb_emlrtRSI; 63 check_forloop_overflow_error(&c_st); 64 } 65 66 exitg1 = false; 67 while ((!exitg1) && (i1 <= i2)) { 68 if (!x[i1 - 1]) { 69 y[iy] = false; 70 exitg1 = true; 71 } else { 72 i1++; 73 } 74 } 75 } 76 } 77 78 boolean_T b_all(const boolean_T x[16]) 79 { 80 boolean_T y; 81 int32_T k; 82 boolean_T exitg1; 83 y = true; 84 k = 0; 85 exitg1 = false; 86 while ((!exitg1) && (k < 16)) { 87 if (!x[k]) { 88 y = false; 89 exitg1 = true; 90 } else { 91 k++; 92 } 93 } 94 95 return y; 96 } 97 98 boolean_T c_all(const boolean_T x[3]) 99 { 100 boolean_T y; 101 int32_T k; 102 boolean_T exitg1; 103 y = true; 104 k = 0; 105 exitg1 = false; 106 while ((!exitg1) && (k < 3)) { 107 if (!x[k]) { 108 y = false; 109 exitg1 = true; 110 } else { 111 k++; 112 } 113 } 114 115 return y; 116 } 117 118 void d_all(const emlrtStack *sp, const boolean_T x[48], boolean_T y[16]) 119 { 120 int32_T i2; 121 int32_T iy; 122 int32_T i; 123 int32_T i1; 124 boolean_T exitg1; 125 emlrtStack st; 126 emlrtStack b_st; 127 emlrtStack c_st; 128 st.prev = sp; 129 st.tls = sp->tls; 130 st.site = &ib_emlrtRSI; 131 b_st.prev = &st; 132 b_st.tls = st.tls; 133 c_st.prev = &b_st; 134 c_st.tls = b_st.tls; 135 for (i2 = 0; i2 < 16; i2++) { 136 y[i2] = true; 137 } 138 139 i2 = 0; 140 iy = -1; 141 for (i = 0; i < 16; i++) { 142 i1 = i2 + 1; 143 i2 += 3; 144 iy++; 145 b_st.site = &jb_emlrtRSI; 146 if ((!(i1 > i2)) && (i2 > 2147483646)) { 147 c_st.site = &kb_emlrtRSI; 148 check_forloop_overflow_error(&c_st); 149 } 150 151 exitg1 = false; 152 while ((!exitg1) && (i1 <= i2)) { 153 if (!x[i1 - 1]) { 154 y[iy] = false; 155 exitg1 = true; 156 } else { 157 i1++; 158 } 159 } 160 } 161 } 162 163 void e_all(const emlrtStack *sp, const boolean_T x[320], boolean_T y[16]) 164 { 165 int32_T i2; 166 int32_T iy; 167 int32_T i; 168 int32_T i1; 169 boolean_T exitg1; 170 emlrtStack st; 171 emlrtStack b_st; 172 emlrtStack c_st; 173 st.prev = sp; 174 st.tls = sp->tls; 175 st.site = &ib_emlrtRSI; 176 b_st.prev = &st; 177 b_st.tls = st.tls; 178 c_st.prev = &b_st; 179 c_st.tls = b_st.tls; 180 for (i2 = 0; i2 < 16; i2++) { 181 y[i2] = true; 182 } 183 184 i2 = 0; 185 iy = -1; 186 for (i = 0; i < 16; i++) { 187 i1 = i2 + 1; 188 i2 += 20; 189 iy++; 190 b_st.site = &jb_emlrtRSI; 191 if ((!(i1 > i2)) && (i2 > 2147483646)) { 192 c_st.site = &kb_emlrtRSI; 193 check_forloop_overflow_error(&c_st); 194 } 195 196 exitg1 = false; 197 while ((!exitg1) && (i1 <= i2)) { 198 if (!x[i1 - 1]) { 199 y[iy] = false; 200 exitg1 = true; 201 } else { 202 i1++; 203 } 204 } 205 } 206 } 207 208 void f_all(const emlrtStack *sp, const boolean_T x_data[], const int32_T x_size 209 [2], boolean_T y[16]) 210 { 211 boolean_T p; 212 boolean_T b_p; 213 int32_T i2; 214 int32_T exitg2; 215 int32_T iy; 216 int32_T i; 217 int32_T i1; 218 boolean_T exitg1; 219 emlrtStack st; 220 emlrtStack b_st; 221 emlrtStack c_st; 222 st.prev = sp; 223 st.tls = sp->tls; 224 st.site = &ib_emlrtRSI; 225 b_st.prev = &st; 226 b_st.tls = st.tls; 227 c_st.prev = &b_st; 228 c_st.tls = b_st.tls; 229 p = false; 230 b_p = false; 231 i2 = 0; 232 do { 233 exitg2 = 0; 234 if (i2 < 2) { 235 if (x_size[i2] != 0) { 236 exitg2 = 1; 237 } else { 238 i2++; 239 } 240 } else { 241 b_p = true; 242 exitg2 = 1; 243 } 244 } while (exitg2 == 0); 245 246 if (!b_p) { 247 } else { 248 p = true; 249 } 250 251 if (!p) { 252 } else { 253 emlrtErrorWithMessageIdR2012b(&st, &q_emlrtRTEI, 254 "Coder:toolbox:eml_all_or_any_specialEmpty", 0); 255 } 256 257 if (x_size[0] != 1) { 258 } else { 259 emlrtErrorWithMessageIdR2012b(&st, &r_emlrtRTEI, 260 "Coder:toolbox:eml_all_or_any_autoDimIncompatibility", 0); 261 } 262 263 for (i2 = 0; i2 < 16; i2++) { 264 y[i2] = true; 265 } 266 267 i2 = 0; 268 iy = -1; 269 for (i = 0; i < 16; i++) { 270 i1 = i2 + 1; 271 i2 += x_size[0]; 272 iy++; 273 b_st.site = &jb_emlrtRSI; 274 if ((!(i1 > i2)) && (i2 > 2147483646)) { 275 c_st.site = &kb_emlrtRSI; 276 check_forloop_overflow_error(&c_st); 277 } 278 279 exitg1 = false; 280 while ((!exitg1) && (i1 <= i2)) { 281 if (!x_data[i1 - 1]) { 282 y[iy] = false; 283 exitg1 = true; 284 } else { 285 i1++; 286 } 287 } 288 } 289 } 290 291 boolean_T g_all(const emlrtStack *sp, const boolean_T x_data[], const int32_T 292 x_size[1]) 293 { 294 boolean_T y; 295 boolean_T p; 296 boolean_T b_p; 297 int32_T k; 298 int32_T exitg2; 299 int32_T b_k; 300 boolean_T exitg1; 301 emlrtStack st; 302 st.prev = sp; 303 st.tls = sp->tls; 304 st.site = &ib_emlrtRSI; 305 p = false; 306 b_p = false; 307 k = 0; 308 do { 309 exitg2 = 0; 310 if (k < 2) { 311 if (k + 1 <= 1) { 312 b_k = x_size[0]; 313 } else { 314 b_k = 1; 315 } 316 317 if (b_k != 0) { 318 exitg2 = 1; 319 } else { 320 k++; 321 } 322 } else { 323 b_p = true; 324 exitg2 = 1; 325 } 326 } while (exitg2 == 0); 327 328 if (!b_p) { 329 } else { 330 p = true; 331 } 332 333 if (!p) { 334 } else { 335 emlrtErrorWithMessageIdR2012b(&st, &q_emlrtRTEI, 336 "Coder:toolbox:eml_all_or_any_specialEmpty", 0); 337 } 338 339 if ((x_size[0] == 1) || (x_size[0] != 1)) { 340 p = true; 341 } else { 342 p = false; 343 } 344 345 if (p) { 346 } else { 347 emlrtErrorWithMessageIdR2012b(&st, &r_emlrtRTEI, 348 "Coder:toolbox:eml_all_or_any_autoDimIncompatibility", 0); 349 } 350 351 y = true; 352 k = 1; 353 exitg1 = false; 354 while ((!exitg1) && (k <= x_size[0])) { 355 if (!x_data[k - 1]) { 356 y = false; 357 exitg1 = true; 358 } else { 359 k++; 360 } 361 } 362 363 return y; 364 } 365 366 boolean_T h_all(const boolean_T x[882]) 367 { 368 boolean_T y; 369 int32_T k; 370 boolean_T exitg1; 371 y = true; 372 k = 0; 373 exitg1 = false; 374 while ((!exitg1) && (k < 882)) { 375 if (!x[k]) { 376 y = false; 377 exitg1 = true; 378 } else { 379 k++; 380 } 381 } 382 383 return y; 384 } 385 386 /* End of code generation (all.c) */ 387 |