fun8_eml_rand_mt19937ar_stateful.cpp 753 B

123456789101112131415161718192021222324252627282930313233343536
  1. //
  2. // File: eml_rand_mt19937ar_stateful.cpp
  3. //
  4. // MATLAB Coder version : 5.2
  5. // C/C++ source code generated on : 09-Mar-2023 16:57:20
  6. //
  7. // Include Files
  8. #include "fun8_eml_rand_mt19937ar_stateful.h"
  9. #include "fun8_AMJamming_H_data.h"
  10. #include "rt_nonfinite.h"
  11. #include <cstring>
  12. // Function Definitions
  13. //
  14. // Arguments : void
  15. // Return Type : void
  16. //
  17. void eml_rand_mt19937ar_stateful_init_8()
  18. {
  19. unsigned int r;
  20. std::memset(&stateL_8[0], 0, 625U * sizeof(unsigned int));
  21. r = 5489U;
  22. stateL_8[0] = 5489U;
  23. for (int mti{0}; mti < 623; mti++) {
  24. r = ((r ^ r >> 30U) * 1812433253U + mti) + 1U;
  25. stateL_8[mti + 1] = r;
  26. }
  27. stateL_8[624] = 624U;
  28. }
  29. //
  30. // File trailer for eml_rand_mt19937ar_stateful.cpp
  31. //
  32. // [EOF]
  33. //