/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rocrand/checkouts/docs-6.1.2/library/include/rocrand/rocrand_log_normal.h Source File

/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rocrand/checkouts/docs-6.1.2/library/include/rocrand/rocrand_log_normal.h Source File#

API library: /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rocrand/checkouts/docs-6.1.2/library/include/rocrand/rocrand_log_normal.h Source File
API library
rocrand_log_normal.h
1 // Copyright (c) 2017-2022 Advanced Micro Devices, Inc. All rights reserved.
2 //
3 // Permission is hereby granted, free of charge, to any person obtaining a copy
4 // of this software and associated documentation files (the "Software"), to deal
5 // in the Software without restriction, including without limitation the rights
6 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 // copies of the Software, and to permit persons to whom the Software is
8 // furnished to do so, subject to the following conditions:
9 //
10 // The above copyright notice and this permission notice shall be included in
11 // all copies or substantial portions of the Software.
12 //
13 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 // THE SOFTWARE.
20 
21 #ifndef ROCRAND_LOG_NORMAL_H_
22 #define ROCRAND_LOG_NORMAL_H_
23 
24 #ifndef FQUALIFIERS
25 #define FQUALIFIERS __forceinline__ __device__
26 #endif // FQUALIFIERS
27 
33 #include <math.h>
34 
35 #include "rocrand/rocrand_lfsr113.h"
36 #include "rocrand/rocrand_mrg31k3p.h"
37 #include "rocrand/rocrand_mrg32k3a.h"
38 #include "rocrand/rocrand_mtgp32.h"
39 #include "rocrand/rocrand_philox4x32_10.h"
40 #include "rocrand/rocrand_scrambled_sobol32.h"
41 #include "rocrand/rocrand_scrambled_sobol64.h"
42 #include "rocrand/rocrand_sobol32.h"
43 #include "rocrand/rocrand_sobol64.h"
44 #include "rocrand/rocrand_threefry2x32_20.h"
45 #include "rocrand/rocrand_threefry2x64_20.h"
46 #include "rocrand/rocrand_threefry4x32_20.h"
47 #include "rocrand/rocrand_threefry4x64_20.h"
48 #include "rocrand/rocrand_xorwow.h"
49 
50 #include "rocrand/rocrand_normal.h"
51 
67 #ifndef ROCRAND_DETAIL_PHILOX_BM_NOT_IN_STATE
69 float rocrand_log_normal(rocrand_state_philox4x32_10 * state, float mean, float stddev)
70 {
71  typedef rocrand_device::detail::engine_boxmuller_helper<rocrand_state_philox4x32_10> bm_helper;
72 
73  if(bm_helper::has_float(state))
74  {
75  return expf(mean + (stddev * bm_helper::get_float(state)));
76  }
77 
78  auto state1 = rocrand(state);
79  auto state2 = rocrand(state);
80 
81  float2 r = rocrand_device::detail::normal_distribution2(state1, state2);
82  bm_helper::save_float(state, r.y);
83  return expf(mean + (stddev * r.x));
84 }
85 #endif // ROCRAND_DETAIL_PHILOX_BM_NOT_IN_STATE
86 
102 float2 rocrand_log_normal2(rocrand_state_philox4x32_10 * state, float mean, float stddev)
103 {
104  auto state1 = rocrand(state);
105  auto state2 = rocrand(state);
106 
107  float2 r = rocrand_device::detail::normal_distribution2(state1, state2);
108  return float2 {
109  expf(mean + (stddev * r.x)),
110  expf(mean + (stddev * r.y))
111  };
112 }
113 
129 float4 rocrand_log_normal4(rocrand_state_philox4x32_10 * state, float mean, float stddev)
130 {
131  float4 r = rocrand_device::detail::normal_distribution4(rocrand4(state));
132  return float4 {
133  expf(mean + (stddev * r.x)),
134  expf(mean + (stddev * r.y)),
135  expf(mean + (stddev * r.z)),
136  expf(mean + (stddev * r.w))
137  };
138 }
139 
155 #ifndef ROCRAND_DETAIL_PHILOX_BM_NOT_IN_STATE
157 double rocrand_log_normal_double(rocrand_state_philox4x32_10 * state, double mean, double stddev)
158 {
159  typedef rocrand_device::detail::engine_boxmuller_helper<rocrand_state_philox4x32_10> bm_helper;
160 
161  if(bm_helper::has_double(state))
162  {
163  return exp(mean + (stddev * bm_helper::get_double(state)));
164  }
165  double2 r = rocrand_device::detail::normal_distribution_double2(rocrand4(state));
166  bm_helper::save_double(state, r.y);
167  return exp(mean + r.x * stddev);
168 }
169 #endif // ROCRAND_DETAIL_PHILOX_BM_NOT_IN_STATE
170 
186 double2 rocrand_log_normal_double2(rocrand_state_philox4x32_10 * state, double mean, double stddev)
187 {
188  double2 r = rocrand_device::detail::normal_distribution_double2(rocrand4(state));
189  return double2 {
190  exp(mean + (stddev * r.x)),
191  exp(mean + (stddev * r.y))
192  };
193 }
194 
210 double4 rocrand_log_normal_double4(rocrand_state_philox4x32_10 * state, double mean, double stddev)
211 {
212  double2 r1, r2;
213  r1 = rocrand_log_normal_double2(state, mean, stddev);
214  r2 = rocrand_log_normal_double2(state, mean, stddev);
215  return double4 {
216  r1.x, r1.y, r2.x, r2.y
217  };
218 }
219 
235 #ifndef ROCRAND_DETAIL_MRG31K3P_BM_NOT_IN_STATE
236 FQUALIFIERS float rocrand_log_normal(rocrand_state_mrg31k3p* state, float mean, float stddev)
237 {
238  typedef rocrand_device::detail::engine_boxmuller_helper<rocrand_state_mrg31k3p> bm_helper;
239 
240  if(bm_helper::has_float(state))
241  {
242  return expf(mean + (stddev * bm_helper::get_float(state)));
243  }
244 
245  auto state1 = state->next();
246  auto state2 = state->next();
247 
248  float2 r
249  = rocrand_device::detail::mrg_normal_distribution2<rocrand_state_mrg31k3p>(state1, state2);
250  bm_helper::save_float(state, r.y);
251  return expf(mean + (stddev * r.x));
252 }
253 #endif // ROCRAND_DETAIL_MRG31K3P_BM_NOT_IN_STATE
254 
269 FQUALIFIERS float2 rocrand_log_normal2(rocrand_state_mrg31k3p* state, float mean, float stddev)
270 {
271  auto state1 = state->next();
272  auto state2 = state->next();
273 
274  float2 r
275  = rocrand_device::detail::mrg_normal_distribution2<rocrand_state_mrg31k3p>(state1, state2);
276  return float2{expf(mean + (stddev * r.x)), expf(mean + (stddev * r.y))};
277 }
278 
294 #ifndef ROCRAND_DETAIL_MRG31K3P_BM_NOT_IN_STATE
295 FQUALIFIERS double
296  rocrand_log_normal_double(rocrand_state_mrg31k3p* state, double mean, double stddev)
297 {
298  typedef rocrand_device::detail::engine_boxmuller_helper<rocrand_state_mrg31k3p> bm_helper;
299 
300  if(bm_helper::has_double(state))
301  {
302  return exp(mean + (stddev * bm_helper::get_double(state)));
303  }
304 
305  auto state1 = state->next();
306  auto state2 = state->next();
307 
308  double2 r
309  = rocrand_device::detail::mrg_normal_distribution_double2<rocrand_state_mrg31k3p>(state1,
310  state2);
311  bm_helper::save_double(state, r.y);
312  return exp(mean + r.x * stddev);
313 }
314 #endif // ROCRAND_DETAIL_MRG31K3P_BM_NOT_IN_STATE
315 
330 FQUALIFIERS double2 rocrand_log_normal_double2(rocrand_state_mrg31k3p* state,
331  double mean,
332  double stddev)
333 {
334  auto state1 = state->next();
335  auto state2 = state->next();
336 
337  double2 r
338  = rocrand_device::detail::mrg_normal_distribution_double2<rocrand_state_mrg31k3p>(state1,
339  state2);
340  return double2{exp(mean + (stddev * r.x)), exp(mean + (stddev * r.y))};
341 }
342 
358 #ifndef ROCRAND_DETAIL_MRG32K3A_BM_NOT_IN_STATE
360 float rocrand_log_normal(rocrand_state_mrg32k3a * state, float mean, float stddev)
361 {
362  typedef rocrand_device::detail::engine_boxmuller_helper<rocrand_state_mrg32k3a> bm_helper;
363 
364  if(bm_helper::has_float(state))
365  {
366  return expf(mean + (stddev * bm_helper::get_float(state)));
367  }
368 
369  auto state1 = state->next();
370  auto state2 = state->next();
371 
372  float2 r
373  = rocrand_device::detail::mrg_normal_distribution2<rocrand_state_mrg32k3a>(state1, state2);
374  bm_helper::save_float(state, r.y);
375  return expf(mean + (stddev * r.x));
376 }
377 #endif // ROCRAND_DETAIL_MRG32K3A_BM_NOT_IN_STATE
378 
394 float2 rocrand_log_normal2(rocrand_state_mrg32k3a * state, float mean, float stddev)
395 {
396  auto state1 = state->next();
397  auto state2 = state->next();
398 
399  float2 r
400  = rocrand_device::detail::mrg_normal_distribution2<rocrand_state_mrg32k3a>(state1, state2);
401  return float2 {
402  expf(mean + (stddev * r.x)),
403  expf(mean + (stddev * r.y))
404  };
405 }
406 
422 #ifndef ROCRAND_DETAIL_MRG32K3A_BM_NOT_IN_STATE
424 double rocrand_log_normal_double(rocrand_state_mrg32k3a * state, double mean, double stddev)
425 {
426  typedef rocrand_device::detail::engine_boxmuller_helper<rocrand_state_mrg32k3a> bm_helper;
427 
428  if(bm_helper::has_double(state))
429  {
430  return exp(mean + (stddev * bm_helper::get_double(state)));
431  }
432 
433  auto state1 = state->next();
434  auto state2 = state->next();
435 
436  double2 r
437  = rocrand_device::detail::mrg_normal_distribution_double2<rocrand_state_mrg32k3a>(state1,
438  state2);
439  bm_helper::save_double(state, r.y);
440  return exp(mean + r.x * stddev);
441 }
442 #endif // ROCRAND_DETAIL_MRG32K3A_BM_NOT_IN_STATE
443 
459 double2 rocrand_log_normal_double2(rocrand_state_mrg32k3a * state, double mean, double stddev)
460 {
461  auto state1 = state->next();
462  auto state2 = state->next();
463 
464  double2 r
465  = rocrand_device::detail::mrg_normal_distribution_double2<rocrand_state_mrg32k3a>(state1,
466  state2);
467  return double2 {
468  exp(mean + (stddev * r.x)),
469  exp(mean + (stddev * r.y))
470  };
471 }
472 
488 #ifndef ROCRAND_DETAIL_XORWOW_BM_NOT_IN_STATE
490 float rocrand_log_normal(rocrand_state_xorwow * state, float mean, float stddev)
491 {
492  typedef rocrand_device::detail::engine_boxmuller_helper<rocrand_state_xorwow> bm_helper;
493 
494  if(bm_helper::has_float(state))
495  {
496  return expf(mean + (stddev * bm_helper::get_float(state)));
497  }
498 
499  auto state1 = rocrand(state);
500  auto state2 = rocrand(state);
501 
502  float2 r = rocrand_device::detail::normal_distribution2(state1, state2);
503  bm_helper::save_float(state, r.y);
504  return expf(mean + (stddev * r.x));
505 }
506 #endif // ROCRAND_DETAIL_XORWOW_BM_NOT_IN_STATE
507 
523 float2 rocrand_log_normal2(rocrand_state_xorwow * state, float mean, float stddev)
524 {
525  auto state1 = rocrand(state);
526  auto state2 = rocrand(state);
527 
528  float2 r = rocrand_device::detail::normal_distribution2(state1, state2);
529  return float2 {
530  expf(mean + (stddev * r.x)),
531  expf(mean + (stddev * r.y))
532  };
533 }
534 
550 #ifndef ROCRAND_DETAIL_XORWOW_BM_NOT_IN_STATE
552 double rocrand_log_normal_double(rocrand_state_xorwow * state, double mean, double stddev)
553 {
554  typedef rocrand_device::detail::engine_boxmuller_helper<rocrand_state_xorwow> bm_helper;
555 
556  if(bm_helper::has_double(state))
557  {
558  return exp(mean + (stddev * bm_helper::get_double(state)));
559  }
560 
561  auto state1 = rocrand(state);
562  auto state2 = rocrand(state);
563  auto state3 = rocrand(state);
564  auto state4 = rocrand(state);
565 
566  double2 r = rocrand_device::detail::normal_distribution_double2(
567  uint4 { state1, state2, state3, state4 }
568  );
569  bm_helper::save_double(state, r.y);
570  return exp(mean + (stddev * r.x));
571 }
572 #endif // ROCRAND_DETAIL_XORWOW_BM_NOT_IN_STATE
573 
589 double2 rocrand_log_normal_double2(rocrand_state_xorwow * state, double mean, double stddev)
590 {
591  auto state1 = rocrand(state);
592  auto state2 = rocrand(state);
593  auto state3 = rocrand(state);
594  auto state4 = rocrand(state);
595 
596  double2 r = rocrand_device::detail::normal_distribution_double2(
597  uint4 { state1, state2, state3, state4 }
598  );
599  return double2 {
600  exp(mean + (stddev * r.x)),
601  exp(mean + (stddev * r.y))
602  };
603 }
604 
618 float rocrand_log_normal(rocrand_state_mtgp32 * state, float mean, float stddev)
619 {
620  float r = rocrand_device::detail::normal_distribution(rocrand(state));
621  return expf(mean + (stddev * r));
622 }
623 
637 double rocrand_log_normal_double(rocrand_state_mtgp32 * state, double mean, double stddev)
638 {
639  double r = rocrand_device::detail::normal_distribution_double(rocrand(state));
640  return exp(mean + (stddev * r));
641 }
642 
656 float rocrand_log_normal(rocrand_state_sobol32 * state, float mean, float stddev)
657 {
658  float r = rocrand_device::detail::normal_distribution(rocrand(state));
659  return expf(mean + (stddev * r));
660 }
661 
675 double rocrand_log_normal_double(rocrand_state_sobol32 * state, double mean, double stddev)
676 {
677  double r = rocrand_device::detail::normal_distribution_double(rocrand(state));
678  return exp(mean + (stddev * r));
679 }
680 
694 float rocrand_log_normal(rocrand_state_scrambled_sobol32* state, float mean, float stddev)
695 {
696  float r = rocrand_device::detail::normal_distribution(rocrand(state));
697  return expf(mean + (stddev * r));
698 }
699 
713 double rocrand_log_normal_double(rocrand_state_scrambled_sobol32* state, double mean, double stddev)
714 {
715  double r = rocrand_device::detail::normal_distribution_double(rocrand(state));
716  return exp(mean + (stddev * r));
717 }
718 
732 float rocrand_log_normal(rocrand_state_sobol64* state, float mean, float stddev)
733 {
734  float r = rocrand_device::detail::normal_distribution(rocrand(state));
735  return expf(mean + (stddev * r));
736 }
737 
751 double rocrand_log_normal_double(rocrand_state_sobol64 * state, double mean, double stddev)
752 {
753  double r = rocrand_device::detail::normal_distribution_double(rocrand(state));
754  return exp(mean + (stddev * r));
755 }
756 
770 float rocrand_log_normal(rocrand_state_scrambled_sobol64* state, float mean, float stddev)
771 {
772  float r = rocrand_device::detail::normal_distribution(rocrand(state));
773  return expf(mean + (stddev * r));
774 }
775 
789 double rocrand_log_normal_double(rocrand_state_scrambled_sobol64* state, double mean, double stddev)
790 {
791  double r = rocrand_device::detail::normal_distribution_double(rocrand(state));
792  return exp(mean + (stddev * r));
793 }
794 
808 float rocrand_log_normal(rocrand_state_lfsr113* state, float mean, float stddev)
809 {
810  float r = rocrand_device::detail::normal_distribution(rocrand(state));
811  return expf(mean + (stddev * r));
812 }
813 
829 float2 rocrand_log_normal2(rocrand_state_lfsr113* state, float mean, float stddev)
830 {
831  auto state1 = rocrand(state);
832  auto state2 = rocrand(state);
833 
834  float2 r = rocrand_device::detail::normal_distribution2(state1, state2);
835  return float2{expf(mean + (stddev * r.x)), expf(mean + (stddev * r.y))};
836 }
837 
851 double rocrand_log_normal_double(rocrand_state_lfsr113* state, double mean, double stddev)
852 {
853  double r = rocrand_device::detail::normal_distribution_double(rocrand(state));
854  return exp(mean + (stddev * r));
855 }
856 
872 double2 rocrand_log_normal_double2(rocrand_state_lfsr113* state, double mean, double stddev)
873 {
874  auto state1 = rocrand(state);
875  auto state2 = rocrand(state);
876  auto state3 = rocrand(state);
877  auto state4 = rocrand(state);
878 
879  double2 r = rocrand_device::detail::normal_distribution_double2(
880  uint4{state1, state2, state3, state4});
881  return double2{exp(mean + (stddev * r.x)), exp(mean + (stddev * r.y))};
882 }
883 
896 FQUALIFIERS float
897  rocrand_log_normal(rocrand_state_threefry2x32_20* state, double mean, double stddev)
898 {
899  float r = rocrand_device::detail::normal_distribution(rocrand(state));
900  return expf(mean + (stddev * r));
901 }
902 
917 FQUALIFIERS float2 rocrand_log_normal2(rocrand_state_threefry2x32_20* state,
918  float mean,
919  float stddev)
920 {
921  auto state1 = rocrand(state);
922  auto state2 = rocrand(state);
923 
924  float2 r = rocrand_device::detail::normal_distribution2(state1, state2);
925  return float2{expf(mean + (stddev * r.x)), expf(mean + (stddev * r.y))};
926 }
927 
940 FQUALIFIERS double
941  rocrand_log_normal_double(rocrand_state_threefry2x32_20* state, double mean, double stddev)
942 {
943  double r = rocrand_device::detail::normal_distribution_double(rocrand(state));
944  return exp(mean + (stddev * r));
945 }
946 
961 FQUALIFIERS double2 rocrand_log_normal_double2(rocrand_state_threefry2x32_20* state,
962  double mean,
963  double stddev)
964 {
965  auto state1 = rocrand(state);
966  auto state2 = rocrand(state);
967  auto state3 = rocrand(state);
968  auto state4 = rocrand(state);
969 
970  double2 r = rocrand_device::detail::normal_distribution_double2(
971  uint4{state1, state2, state3, state4});
972  return double2{exp(mean + (stddev * r.x)), exp(mean + (stddev * r.y))};
973 }
974 
987 FQUALIFIERS float
988  rocrand_log_normal(rocrand_state_threefry2x64_20* state, double mean, double stddev)
989 {
990  float r = rocrand_device::detail::normal_distribution(rocrand(state));
991  return expf(mean + (stddev * r));
992 }
993 
1008 FQUALIFIERS float2 rocrand_log_normal2(rocrand_state_threefry2x64_20* state,
1009  float mean,
1010  float stddev)
1011 {
1012  auto state1 = rocrand(state);
1013  auto state2 = rocrand(state);
1014 
1015  float2 r = rocrand_device::detail::normal_distribution2(state1, state2);
1016  return float2{expf(mean + (stddev * r.x)), expf(mean + (stddev * r.y))};
1017 }
1018 
1031 FQUALIFIERS double
1032  rocrand_log_normal_double(rocrand_state_threefry2x64_20* state, double mean, double stddev)
1033 {
1034  double r = rocrand_device::detail::normal_distribution_double(rocrand(state));
1035  return exp(mean + (stddev * r));
1036 }
1037 
1052 FQUALIFIERS double2 rocrand_log_normal_double2(rocrand_state_threefry2x64_20* state,
1053  double mean,
1054  double stddev)
1055 {
1056  auto state1 = rocrand(state);
1057  auto state2 = rocrand(state);
1058  auto state3 = rocrand(state);
1059  auto state4 = rocrand(state);
1060 
1061  double2 r = rocrand_device::detail::normal_distribution_double2(
1062  uint4{state1, state2, state3, state4});
1063  return double2{exp(mean + (stddev * r.x)), exp(mean + (stddev * r.y))};
1064 }
1065 
1078 FQUALIFIERS float
1079  rocrand_log_normal(rocrand_state_threefry4x32_20* state, double mean, double stddev)
1080 {
1081  float r = rocrand_device::detail::normal_distribution(rocrand(state));
1082  return expf(mean + (stddev * r));
1083 }
1084 
1099 FQUALIFIERS float2 rocrand_log_normal2(rocrand_state_threefry4x32_20* state,
1100  float mean,
1101  float stddev)
1102 {
1103  auto state1 = rocrand(state);
1104  auto state2 = rocrand(state);
1105 
1106  float2 r = rocrand_device::detail::normal_distribution2(state1, state2);
1107  return float2{expf(mean + (stddev * r.x)), expf(mean + (stddev * r.y))};
1108 }
1109 
1122 FQUALIFIERS double
1123  rocrand_log_normal_double(rocrand_state_threefry4x32_20* state, double mean, double stddev)
1124 {
1125  double r = rocrand_device::detail::normal_distribution_double(rocrand(state));
1126  return exp(mean + (stddev * r));
1127 }
1128 
1143 FQUALIFIERS double2 rocrand_log_normal_double2(rocrand_state_threefry4x32_20* state,
1144  double mean,
1145  double stddev)
1146 {
1147  auto state1 = rocrand(state);
1148  auto state2 = rocrand(state);
1149  auto state3 = rocrand(state);
1150  auto state4 = rocrand(state);
1151 
1152  double2 r = rocrand_device::detail::normal_distribution_double2(
1153  uint4{state1, state2, state3, state4});
1154  return double2{exp(mean + (stddev * r.x)), exp(mean + (stddev * r.y))};
1155 }
1156 
1169 FQUALIFIERS float
1170  rocrand_log_normal(rocrand_state_threefry4x64_20* state, double mean, double stddev)
1171 {
1172  float r = rocrand_device::detail::normal_distribution(rocrand(state));
1173  return expf(mean + (stddev * r));
1174 }
1175 
1190 FQUALIFIERS float2 rocrand_log_normal2(rocrand_state_threefry4x64_20* state,
1191  float mean,
1192  float stddev)
1193 {
1194  auto state1 = rocrand(state);
1195  auto state2 = rocrand(state);
1196 
1197  float2 r = rocrand_device::detail::normal_distribution2(state1, state2);
1198  return float2{expf(mean + (stddev * r.x)), expf(mean + (stddev * r.y))};
1199 }
1200 
1213 FQUALIFIERS double
1214  rocrand_log_normal_double(rocrand_state_threefry4x64_20* state, double mean, double stddev)
1215 {
1216  double r = rocrand_device::detail::normal_distribution_double(rocrand(state));
1217  return exp(mean + (stddev * r));
1218 }
1219 
1234 FQUALIFIERS double2 rocrand_log_normal_double2(rocrand_state_threefry4x64_20* state,
1235  double mean,
1236  double stddev)
1237 {
1238  auto state1 = rocrand(state);
1239  auto state2 = rocrand(state);
1240  auto state3 = rocrand(state);
1241  auto state4 = rocrand(state);
1242 
1243  double2 r = rocrand_device::detail::normal_distribution_double2(
1244  uint4{state1, state2, state3, state4});
1245  return double2{exp(mean + (stddev * r.x)), exp(mean + (stddev * r.y))};
1246 }
1247  // end of group rocranddevice
1249 
1250 #endif // ROCRAND_LOG_NORMAL_H_
FQUALIFIERS double2 rocrand_log_normal_double2(rocrand_state_philox4x32_10 *state, double mean, double stddev)
Returns two log-normally distributed double values.
Definition: rocrand_log_normal.h:186
FQUALIFIERS double rocrand_log_normal_double(rocrand_state_philox4x32_10 *state, double mean, double stddev)
Returns a log-normally distributed double values.
Definition: rocrand_log_normal.h:157
FQUALIFIERS float4 rocrand_log_normal4(rocrand_state_philox4x32_10 *state, float mean, float stddev)
Returns four log-normally distributed float values.
Definition: rocrand_log_normal.h:129
FQUALIFIERS float2 rocrand_log_normal2(rocrand_state_philox4x32_10 *state, float mean, float stddev)
Returns two log-normally distributed float values.
Definition: rocrand_log_normal.h:102
FQUALIFIERS unsigned int rocrand(rocrand_state_lfsr113 *state)
Returns uniformly distributed random unsigned int value from [0; 2^32 - 1] range.
Definition: rocrand_lfsr113.h:253
FQUALIFIERS double4 rocrand_log_normal_double4(rocrand_state_philox4x32_10 *state, double mean, double stddev)
Returns four log-normally distributed double values.
Definition: rocrand_log_normal.h:210
FQUALIFIERS float rocrand_log_normal(rocrand_state_philox4x32_10 *state, float mean, float stddev)
Returns a log-normally distributed float value.
Definition: rocrand_log_normal.h:69
FQUALIFIERS uint4 rocrand4(rocrand_state_philox4x32_10 *state)
Returns four uniformly distributed random unsigned int values from [0; 2^32 - 1] range.
Definition: rocrand_philox4x32_10.h:410
#define FQUALIFIERS
Shorthand for commonly used function qualifiers.
Definition: rocrand_uniform.h:31