mkl_vsl_omp_variant.f90 46 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220
  1. !===============================================================================
  2. ! Copyright 2020-2022 Intel Corporation.
  3. !
  4. ! This software and the related documents are Intel copyrighted materials, and
  5. ! your use of them is governed by the express license under which they were
  6. ! provided to you (License). Unless the License provides otherwise, you may not
  7. ! use, modify, copy, publish, distribute, disclose or transmit this software or
  8. ! the related documents without Intel's prior written permission.
  9. !
  10. ! This software and the related documents are provided as is, with no express
  11. ! or implied warranties, other than those that are expressly stated in the
  12. ! License.
  13. !===============================================================================
  14. ! Content:
  15. ! oneMKL Library FORTRAN interface for VSL OpenMP offload
  16. !*******************************************************************************
  17. include "mkl_vsl.f90"
  18. module onemkl_vsl_omp_variant
  19. use MKL_VSL_TYPE
  20. !++
  21. ! VSL CONTINUOUS DISTRIBUTION GENERATOR FUNCTION INTERFACES.
  22. !--
  23. ! Uniform distribution
  24. interface
  25. integer function mkl_vsl_vsrnguniform_omp_offload (method, stream, n, r, a, b, interop) BIND(C)
  26. use,intrinsic :: iso_c_binding
  27. import :: VSL_STREAM_STATE
  28. integer,intent(in) :: method
  29. type(VSL_STREAM_STATE) :: stream
  30. integer,intent(in) :: n
  31. real(kind=4),intent(out) :: r(n)
  32. real(kind=4),intent(in) :: a
  33. real(kind=4),intent(in) :: b
  34. type(c_ptr),intent(in) :: interop
  35. end function mkl_vsl_vsrnguniform_omp_offload
  36. end interface
  37. interface
  38. integer function mkl_vsl_vdrnguniform_omp_offload (method, stream, n, r, a, b, interop) BIND(C)
  39. use,intrinsic :: iso_c_binding
  40. import :: VSL_STREAM_STATE
  41. integer,intent(in) :: method
  42. type(VSL_STREAM_STATE) :: stream
  43. integer,intent(in) :: n
  44. real(kind=8),intent(out) :: r(n)
  45. real(kind=8),intent(in) :: a
  46. real(kind=8),intent(in) :: b
  47. type(c_ptr),intent(in) :: interop
  48. end function mkl_vsl_vdrnguniform_omp_offload
  49. end interface
  50. ! Gaussian distribution
  51. interface
  52. integer function mkl_vsl_vsrnggaussian_omp_offload (method, stream, n, r, a, sigma, interop) BIND(C)
  53. use,intrinsic :: iso_c_binding
  54. import :: VSL_STREAM_STATE
  55. integer,intent(in) :: method
  56. type(VSL_STREAM_STATE) :: stream
  57. integer,intent(in) :: n
  58. real(kind=4),intent(out) :: r(n)
  59. real(kind=4),intent(in) :: a
  60. real(kind=4),intent(in) :: sigma
  61. type(c_ptr),intent(in) :: interop
  62. end function mkl_vsl_vsrnggaussian_omp_offload
  63. end interface
  64. interface
  65. integer function mkl_vsl_vdrnggaussian_omp_offload (method, stream, n, r, a, sigma, interop) BIND(C)
  66. use,intrinsic :: iso_c_binding
  67. import :: VSL_STREAM_STATE
  68. integer,intent(in) :: method
  69. type(VSL_STREAM_STATE) :: stream
  70. integer,intent(in) :: n
  71. real(kind=8),intent(out) :: r(n)
  72. real(kind=8),intent(in) :: a
  73. real(kind=8),intent(in) :: sigma
  74. type(c_ptr),intent(in) :: interop
  75. end function mkl_vsl_vdrnggaussian_omp_offload
  76. end interface
  77. ! GaussianMV distribution
  78. interface
  79. integer function mkl_vsl_vsrnggaussianmv_omp_offload (method, stream, n, r, dimen, mstorage, a, t, interop) BIND(C)
  80. use,intrinsic :: iso_c_binding
  81. import :: VSL_STREAM_STATE
  82. integer,intent(in) :: method
  83. type(VSL_STREAM_STATE) :: stream
  84. integer,intent(in) :: n
  85. integer, intent(in) :: dimen
  86. real(kind=4),intent(out) :: r(dimen,n)
  87. integer, intent(in) :: mstorage
  88. real(kind=4),intent(in) :: a(dimen)
  89. real(kind=4),intent(in) :: t(dimen,dimen)
  90. type(c_ptr),intent(in) :: interop
  91. end function mkl_vsl_vsrnggaussianmv_omp_offload
  92. end interface
  93. interface
  94. integer function mkl_vsl_vdrnggaussianmv_omp_offload (method, stream, n, r, dimen, mstorage, a, t, interop) BIND(C)
  95. use,intrinsic :: iso_c_binding
  96. import :: VSL_STREAM_STATE
  97. integer,intent(in) :: method
  98. type(VSL_STREAM_STATE) :: stream
  99. integer,intent(in) :: n
  100. integer, intent(in) :: dimen
  101. real(kind=8),intent(out) :: r(dimen,n)
  102. integer, intent(in) :: mstorage
  103. real(kind=8),intent(in) :: a(dimen)
  104. real(kind=8),intent(in) :: t(dimen,dimen)
  105. type(c_ptr),intent(in) :: interop
  106. end function mkl_vsl_vdrnggaussianmv_omp_offload
  107. end interface
  108. ! Multinomial distribution
  109. interface
  110. integer function mkl_vsl_virngmultinomial_omp_offload (method, stream, n, r, ntrial, k, p, interop) BIND(C)
  111. use,intrinsic :: iso_c_binding
  112. import :: VSL_STREAM_STATE
  113. integer,intent(in) :: method
  114. type(VSL_STREAM_STATE) :: stream
  115. integer,intent(in) :: n
  116. integer(kind=4),intent(out) :: r(n)
  117. integer, intent(in) :: ntrial
  118. integer, intent(in) :: k
  119. real(kind=8),intent(in) :: p(k)
  120. type(c_ptr),intent(in) :: interop
  121. end function mkl_vsl_virngmultinomial_omp_offload
  122. end interface
  123. ! PoissonV distribution
  124. interface
  125. integer function mkl_vsl_virngpoissonv_omp_offload (method, stream, n, r, lambda, interop) BIND(C)
  126. use,intrinsic :: iso_c_binding
  127. import :: VSL_STREAM_STATE
  128. integer,intent(in) :: method
  129. type(VSL_STREAM_STATE) :: stream
  130. integer,intent(in) :: n
  131. integer(kind=4),intent(out) :: r(n)
  132. real(kind=8),intent(in) :: lambda(n)
  133. type(c_ptr),intent(in) :: interop
  134. end function mkl_vsl_virngpoissonv_omp_offload
  135. end interface
  136. ! Exponential distribution
  137. interface
  138. integer function mkl_vsl_vsrngexponential_omp_offload (method, stream, n, r, a, beta, interop) BIND(C)
  139. use,intrinsic :: iso_c_binding
  140. import :: VSL_STREAM_STATE
  141. integer,intent(in) :: method
  142. type(VSL_STREAM_STATE) :: stream
  143. integer,intent(in) :: n
  144. real(kind=4),intent(out) :: r(n)
  145. real(kind=4),intent(in) :: a
  146. real(kind=4),intent(in) :: beta
  147. type(c_ptr),intent(in) :: interop
  148. end function mkl_vsl_vsrngexponential_omp_offload
  149. end interface
  150. interface
  151. integer function mkl_vsl_vdrngexponential_omp_offload (method, stream, n, r, a, beta, interop) BIND(C)
  152. use,intrinsic :: iso_c_binding
  153. import :: VSL_STREAM_STATE
  154. integer,intent(in) :: method
  155. type(VSL_STREAM_STATE) :: stream
  156. integer,intent(in) :: n
  157. real(kind=8),intent(out) :: r(n)
  158. real(kind=8),intent(in) :: a
  159. real(kind=8),intent(in) :: beta
  160. type(c_ptr),intent(in) :: interop
  161. end function mkl_vsl_vdrngexponential_omp_offload
  162. end interface
  163. ! Laplace distribution
  164. interface
  165. integer function mkl_vsl_vsrnglaplace_omp_offload (method, stream, n, r, a, beta, interop) BIND(C)
  166. use,intrinsic :: iso_c_binding
  167. import :: VSL_STREAM_STATE
  168. integer,intent(in) :: method
  169. type(VSL_STREAM_STATE) :: stream
  170. integer,intent(in) :: n
  171. real(kind=4),intent(out) :: r(n)
  172. real(kind=4),intent(in) :: a
  173. real(kind=4),intent(in) :: beta
  174. type(c_ptr),intent(in) :: interop
  175. end function mkl_vsl_vsrnglaplace_omp_offload
  176. end interface
  177. interface
  178. integer function mkl_vsl_vdrnglaplace_omp_offload (method, stream, n, r, a, beta, interop) BIND(C)
  179. use,intrinsic :: iso_c_binding
  180. import :: VSL_STREAM_STATE
  181. integer,intent(in) :: method
  182. type(VSL_STREAM_STATE) :: stream
  183. integer,intent(in) :: n
  184. real(kind=8),intent(out) :: r(n)
  185. real(kind=8),intent(in) :: a
  186. real(kind=8),intent(in) :: beta
  187. type(c_ptr),intent(in) :: interop
  188. end function mkl_vsl_vdrnglaplace_omp_offload
  189. end interface
  190. ! Weibull distribution
  191. interface
  192. integer function mkl_vsl_vsrngweibull_omp_offload (method, stream, n, r, alpha, a, beta, interop) BIND(C)
  193. use,intrinsic :: iso_c_binding
  194. import :: VSL_STREAM_STATE
  195. integer,intent(in) :: method
  196. type(VSL_STREAM_STATE) :: stream
  197. integer,intent(in) :: n
  198. real(kind=4),intent(out) :: r(n)
  199. real(kind=4),intent(in) :: alpha
  200. real(kind=4),intent(in) :: a
  201. real(kind=4),intent(in) :: beta
  202. type(c_ptr),intent(in) :: interop
  203. end function mkl_vsl_vsrngweibull_omp_offload
  204. end interface
  205. interface
  206. integer function mkl_vsl_vdrngweibull_omp_offload (method, stream, n, r, alpha, a, beta, interop) BIND(C)
  207. use,intrinsic :: iso_c_binding
  208. import :: VSL_STREAM_STATE
  209. integer,intent(in) :: method
  210. type(VSL_STREAM_STATE) :: stream
  211. integer,intent(in) :: n
  212. real(kind=8),intent(out) :: r(n)
  213. real(kind=8),intent(in) :: alpha
  214. real(kind=8),intent(in) :: a
  215. real(kind=8),intent(in) :: beta
  216. type(c_ptr),intent(in) :: interop
  217. end function mkl_vsl_vdrngweibull_omp_offload
  218. end interface
  219. ! Cauchy distribution
  220. interface
  221. integer function mkl_vsl_vsrngcauchy_omp_offload (method, stream, n, r, a, beta, interop) BIND(C)
  222. use,intrinsic :: iso_c_binding
  223. import :: VSL_STREAM_STATE
  224. integer,intent(in) :: method
  225. type(VSL_STREAM_STATE) :: stream
  226. integer,intent(in) :: n
  227. real(kind=4),intent(out) :: r(n)
  228. real(kind=4),intent(in) :: a
  229. real(kind=4),intent(in) :: beta
  230. type(c_ptr),intent(in) :: interop
  231. end function mkl_vsl_vsrngcauchy_omp_offload
  232. end interface
  233. interface
  234. integer function mkl_vsl_vdrngcauchy_omp_offload (method, stream, n, r, a, beta, interop) BIND(C)
  235. use,intrinsic :: iso_c_binding
  236. import :: VSL_STREAM_STATE
  237. integer,intent(in) :: method
  238. type(VSL_STREAM_STATE) :: stream
  239. integer,intent(in) :: n
  240. real(kind=8),intent(out) :: r(n)
  241. real(kind=8),intent(in) :: a
  242. real(kind=8),intent(in) :: beta
  243. type(c_ptr),intent(in) :: interop
  244. end function mkl_vsl_vdrngcauchy_omp_offload
  245. end interface
  246. ! Rayleigh distribution
  247. interface
  248. integer function mkl_vsl_vsrngrayleigh_omp_offload (method, stream, n, r, a, beta, interop) BIND(C)
  249. use,intrinsic :: iso_c_binding
  250. import :: VSL_STREAM_STATE
  251. integer,intent(in) :: method
  252. type(VSL_STREAM_STATE) :: stream
  253. integer,intent(in) :: n
  254. real(kind=4),intent(out) :: r(n)
  255. real(kind=4),intent(in) :: a
  256. real(kind=4),intent(in) :: beta
  257. type(c_ptr),intent(in) :: interop
  258. end function mkl_vsl_vsrngrayleigh_omp_offload
  259. end interface
  260. interface
  261. integer function mkl_vsl_vdrngrayleigh_omp_offload (method, stream, n, r, a, beta, interop) BIND(C)
  262. use,intrinsic :: iso_c_binding
  263. import :: VSL_STREAM_STATE
  264. integer,intent(in) :: method
  265. type(VSL_STREAM_STATE) :: stream
  266. integer,intent(in) :: n
  267. real(kind=8),intent(out) :: r(n)
  268. real(kind=8),intent(in) :: a
  269. real(kind=8),intent(in) :: beta
  270. type(c_ptr),intent(in) :: interop
  271. end function mkl_vsl_vdrngrayleigh_omp_offload
  272. end interface
  273. ! Lognormal distribution
  274. interface
  275. integer function mkl_vsl_vsrnglognormal_omp_offload (method, stream, n, r, a, sigma, b, beta, interop) BIND(C)
  276. use,intrinsic :: iso_c_binding
  277. import :: VSL_STREAM_STATE
  278. integer,intent(in) :: method
  279. type(VSL_STREAM_STATE) :: stream
  280. integer,intent(in) :: n
  281. real(kind=4),intent(out) :: r(n)
  282. real(kind=4),intent(in) :: a
  283. real(kind=4),intent(in) :: sigma
  284. real(kind=4),intent(in) :: b
  285. real(kind=4),intent(in) :: beta
  286. type(c_ptr),intent(in) :: interop
  287. end function mkl_vsl_vsrnglognormal_omp_offload
  288. end interface
  289. interface
  290. integer function mkl_vsl_vdrnglognormal_omp_offload (method, stream, n, r, a, sigma, b, beta, interop) BIND(C)
  291. use,intrinsic :: iso_c_binding
  292. import :: VSL_STREAM_STATE
  293. integer,intent(in) :: method
  294. type(VSL_STREAM_STATE) :: stream
  295. integer,intent(in) :: n
  296. real(kind=8),intent(out) :: r(n)
  297. real(kind=8),intent(in) :: a
  298. real(kind=8),intent(in) :: sigma
  299. real(kind=8),intent(in) :: b
  300. real(kind=8),intent(in) :: beta
  301. type(c_ptr),intent(in) :: interop
  302. end function mkl_vsl_vdrnglognormal_omp_offload
  303. end interface
  304. ! Gumbel distribution
  305. interface
  306. integer function mkl_vsl_vsrnggumbel_omp_offload (method, stream, n, r, a, beta, interop) BIND(C)
  307. use,intrinsic :: iso_c_binding
  308. import :: VSL_STREAM_STATE
  309. integer,intent(in) :: method
  310. type(VSL_STREAM_STATE) :: stream
  311. integer,intent(in) :: n
  312. real(kind=4),intent(out) :: r(n)
  313. real(kind=4),intent(in) :: a
  314. real(kind=4),intent(in) :: beta
  315. type(c_ptr),intent(in) :: interop
  316. end function mkl_vsl_vsrnggumbel_omp_offload
  317. end interface
  318. interface
  319. integer function mkl_vsl_vdrnggumbel_omp_offload (method, stream, n, r, a, beta, interop) BIND(C)
  320. use,intrinsic :: iso_c_binding
  321. import :: VSL_STREAM_STATE
  322. integer,intent(in) :: method
  323. type(VSL_STREAM_STATE) :: stream
  324. integer,intent(in) :: n
  325. real(kind=8),intent(out) :: r(n)
  326. real(kind=8),intent(in) :: a
  327. real(kind=8),intent(in) :: beta
  328. type(c_ptr),intent(in) :: interop
  329. end function mkl_vsl_vdrnggumbel_omp_offload
  330. end interface
  331. ! Beta distribution
  332. interface
  333. integer function mkl_vsl_vsrngbeta_omp_offload (method, stream, n, r, p, q, a, beta, interop) BIND(C)
  334. use,intrinsic :: iso_c_binding
  335. import :: VSL_STREAM_STATE
  336. integer,intent(in) :: method
  337. type(VSL_STREAM_STATE) :: stream
  338. integer,intent(in) :: n
  339. real(kind=4),intent(out) :: r(n)
  340. real(kind=4),intent(in) :: p
  341. real(kind=4),intent(in) :: q
  342. real(kind=4),intent(in) :: a
  343. real(kind=4),intent(in) :: beta
  344. type(c_ptr),intent(in) :: interop
  345. end function mkl_vsl_vsrngbeta_omp_offload
  346. end interface
  347. interface
  348. integer function mkl_vsl_vdrngbeta_omp_offload (method, stream, n, r, p, q, a, beta, interop) BIND(C)
  349. use,intrinsic :: iso_c_binding
  350. import :: VSL_STREAM_STATE
  351. integer,intent(in) :: method
  352. type(VSL_STREAM_STATE) :: stream
  353. integer,intent(in) :: n
  354. real(kind=8),intent(out) :: r(n)
  355. real(kind=8),intent(in) :: p
  356. real(kind=8),intent(in) :: q
  357. real(kind=8),intent(in) :: a
  358. real(kind=8),intent(in) :: beta
  359. type(c_ptr),intent(in) :: interop
  360. end function mkl_vsl_vdrngbeta_omp_offload
  361. end interface
  362. ! Gamma distribution
  363. interface
  364. integer function mkl_vsl_vsrnggamma_omp_offload (method, stream, n, r, alpha, a, beta, interop) BIND(C)
  365. use,intrinsic :: iso_c_binding
  366. import :: VSL_STREAM_STATE
  367. integer,intent(in) :: method
  368. type(VSL_STREAM_STATE) :: stream
  369. integer,intent(in) :: n
  370. real(kind=4),intent(out) :: r(n)
  371. real(kind=4),intent(in) :: alpha
  372. real(kind=4),intent(in) :: a
  373. real(kind=4),intent(in) :: beta
  374. type(c_ptr),intent(in) :: interop
  375. end function mkl_vsl_vsrnggamma_omp_offload
  376. end interface
  377. interface
  378. integer function mkl_vsl_vdrnggamma_omp_offload (method, stream, n, r, alpha, a, beta, interop) BIND(C)
  379. use,intrinsic :: iso_c_binding
  380. import :: VSL_STREAM_STATE
  381. integer,intent(in) :: method
  382. type(VSL_STREAM_STATE) :: stream
  383. integer,intent(in) :: n
  384. real(kind=8),intent(out) :: r(n)
  385. real(kind=8),intent(in) :: alpha
  386. real(kind=8),intent(in) :: a
  387. real(kind=8),intent(in) :: beta
  388. type(c_ptr),intent(in) :: interop
  389. end function mkl_vsl_vdrnggamma_omp_offload
  390. end interface
  391. ! ChiSquare distribution
  392. interface
  393. integer function mkl_vsl_vsrngchisquare_omp_offload (method, stream, n, r, v, interop) BIND(C)
  394. use,intrinsic :: iso_c_binding
  395. import :: VSL_STREAM_STATE
  396. integer,intent(in) :: method
  397. type(VSL_STREAM_STATE) :: stream
  398. integer,intent(in) :: n
  399. real(kind=4),intent(out) :: r(n)
  400. integer,intent(in) :: v
  401. type(c_ptr),intent(in) :: interop
  402. end function mkl_vsl_vsrngchisquare_omp_offload
  403. end interface
  404. interface
  405. integer function mkl_vsl_vdrngchisquare_omp_offload (method, stream, n, r, v, interop) BIND(C)
  406. use,intrinsic :: iso_c_binding
  407. import :: VSL_STREAM_STATE
  408. integer,intent(in) :: method
  409. type(VSL_STREAM_STATE) :: stream
  410. integer,intent(in) :: n
  411. real(kind=8),intent(out) :: r(n)
  412. integer,intent(in) :: v
  413. type(c_ptr),intent(in) :: interop
  414. end function mkl_vsl_vdrngchisquare_omp_offload
  415. end interface
  416. !++
  417. ! VSL DISCRETE DISTRIBUTION GENERATOR FUNCTION INTERFACES.
  418. !--
  419. ! Uniform distribution
  420. interface
  421. integer function mkl_vsl_virnguniform_omp_offload (method, stream, n, r, a, b, interop) BIND(C)
  422. use,intrinsic :: iso_c_binding
  423. import :: VSL_STREAM_STATE
  424. integer,intent(in) :: method
  425. type(VSL_STREAM_STATE) :: stream
  426. integer,intent(in) :: n
  427. integer(kind=4),intent(out) :: r(n)
  428. integer(kind=4),intent(in) :: a
  429. integer(kind=4),intent(in) :: b
  430. type(c_ptr),intent(in) :: interop
  431. end function mkl_vsl_virnguniform_omp_offload
  432. end interface
  433. ! UniformBits distribution
  434. interface
  435. integer function mkl_vsl_virnguniformbits_omp_offload (method, stream, n, r, interop) BIND(C)
  436. use,intrinsic :: iso_c_binding
  437. import :: VSL_STREAM_STATE
  438. integer,intent(in) :: method
  439. type(VSL_STREAM_STATE) :: stream
  440. integer,intent(in) :: n
  441. integer(kind=4),intent(out) :: r(n)
  442. type(c_ptr),intent(in) :: interop
  443. end function mkl_vsl_virnguniformbits_omp_offload
  444. end interface
  445. ! UniformBits32 distribution
  446. interface
  447. integer function mkl_vsl_virnguniformbits32_omp_offload (method, stream, n, r, interop) BIND(C)
  448. use,intrinsic :: iso_c_binding
  449. import :: VSL_STREAM_STATE
  450. integer,intent(in) :: method
  451. type(VSL_STREAM_STATE) :: stream
  452. integer,intent(in) :: n
  453. integer(kind=4),intent(out) :: r(n)
  454. type(c_ptr),intent(in) :: interop
  455. end function mkl_vsl_virnguniformbits32_omp_offload
  456. end interface
  457. ! UniformBits64 distribution
  458. interface
  459. integer function mkl_vsl_virnguniformbits64_omp_offload (method, stream, n, r, interop) BIND(C)
  460. use,intrinsic :: iso_c_binding
  461. import :: VSL_STREAM_STATE
  462. integer,intent(in) :: method
  463. type(VSL_STREAM_STATE) :: stream
  464. integer,intent(in) :: n
  465. integer(kind=8),intent(out) :: r(n)
  466. type(c_ptr),intent(in) :: interop
  467. end function mkl_vsl_virnguniformbits64_omp_offload
  468. end interface
  469. ! Bernoulli distribution
  470. interface
  471. integer function mkl_vsl_virngbernoulli_omp_offload (method, stream, n, r, p, interop) BIND(C)
  472. use,intrinsic :: iso_c_binding
  473. import :: VSL_STREAM_STATE
  474. integer,intent(in) :: method
  475. type(VSL_STREAM_STATE) :: stream
  476. integer,intent(in) :: n
  477. integer(kind=4),intent(out) :: r(n)
  478. real(kind=8),intent(in) :: p
  479. type(c_ptr),intent(in) :: interop
  480. end function mkl_vsl_virngbernoulli_omp_offload
  481. end interface
  482. ! Geometric distribution
  483. interface
  484. integer function mkl_vsl_virnggeometric_omp_offload (method, stream, n, r, p, interop) BIND(C)
  485. use,intrinsic :: iso_c_binding
  486. import :: VSL_STREAM_STATE
  487. integer,intent(in) :: method
  488. type(VSL_STREAM_STATE) :: stream
  489. integer,intent(in) :: n
  490. integer(kind=4),intent(out) :: r(n)
  491. real(kind=8),intent(in) :: p
  492. type(c_ptr),intent(in) :: interop
  493. end function mkl_vsl_virnggeometric_omp_offload
  494. end interface
  495. ! Hypergeometric distribution
  496. interface
  497. integer function mkl_vsl_virnghypergeometric_omp_offload (method, stream, n, r, l, s, m, interop) BIND(C)
  498. use,intrinsic :: iso_c_binding
  499. import :: VSL_STREAM_STATE
  500. integer,intent(in) :: method
  501. type(VSL_STREAM_STATE) :: stream
  502. integer,intent(in) :: n
  503. integer(kind=4),intent(out) :: r(n)
  504. integer(kind=4),intent(in) :: l
  505. integer(kind=4),intent(in) :: s
  506. integer(kind=4),intent(in) :: m
  507. type(c_ptr),intent(in) :: interop
  508. end function mkl_vsl_virnghypergeometric_omp_offload
  509. end interface
  510. ! Binomial distribution
  511. interface
  512. integer function mkl_vsl_virngbinomial_omp_offload (method, stream, n, r, ntrial, p, interop) BIND(C)
  513. use,intrinsic :: iso_c_binding
  514. import :: VSL_STREAM_STATE
  515. integer,intent(in) :: method
  516. type(VSL_STREAM_STATE) :: stream
  517. integer,intent(in) :: n
  518. integer(kind=4),intent(out) :: r(n)
  519. integer(kind=4),intent(in) :: ntrial
  520. real(kind=8),intent(in) :: p
  521. type(c_ptr),intent(in) :: interop
  522. end function mkl_vsl_virngbinomial_omp_offload
  523. end interface
  524. ! Negbinomial distribution
  525. interface
  526. integer function mkl_vsl_virngnegbinomial_omp_offload (method, stream, n, r, a, p, interop) BIND(C)
  527. use,intrinsic :: iso_c_binding
  528. import :: VSL_STREAM_STATE
  529. integer,intent(in) :: method
  530. type(VSL_STREAM_STATE) :: stream
  531. integer,intent(in) :: n
  532. integer(kind=4),intent(out) :: r(n)
  533. real(kind=8),intent(in) :: a
  534. real(kind=8),intent(in) :: p
  535. type(c_ptr),intent(in) :: interop
  536. end function mkl_vsl_virngnegbinomial_omp_offload
  537. end interface
  538. ! Poisson distribution
  539. interface
  540. integer function mkl_vsl_virngpoisson_omp_offload (method, stream, n, r, lambda, interop) BIND(C)
  541. use,intrinsic :: iso_c_binding
  542. import :: VSL_STREAM_STATE
  543. integer,intent(in) :: method
  544. type(VSL_STREAM_STATE) :: stream
  545. integer,intent(in) :: n
  546. integer(kind=4),intent(out) :: r(n)
  547. real(kind=8),intent(in) :: lambda
  548. type(c_ptr),intent(in) :: interop
  549. end function mkl_vsl_virngpoisson_omp_offload
  550. end interface
  551. !++
  552. ! SUMMARY STATISTICS LIBRARY ROUTINES
  553. !--
  554. ! Compute routines
  555. interface
  556. integer function mkl_vsl_dsscompute_omp_offload(task, estimates, method, interop) BIND(C)
  557. use,intrinsic :: iso_c_binding
  558. import :: VSL_SS_TASK
  559. type(VSL_SS_TASK) :: task
  560. integer(kind=8),intent(in) :: estimates
  561. integer,intent(in) :: method
  562. end function mkl_vsl_dsscompute_omp_offload
  563. end interface
  564. interface
  565. integer function mkl_vsl_ssscompute_omp_offload(task, estimates, method, interop) BIND(C)
  566. use,intrinsic :: iso_c_binding
  567. import :: VSL_SS_TASK
  568. type(VSL_SS_TASK) :: task
  569. integer(kind=8),intent(in) :: estimates
  570. integer,intent(in) :: method
  571. end function mkl_vsl_ssscompute_omp_offload
  572. end interface
  573. end module onemkl_vsl_omp_variant
  574. module onemkl_vsl_omp_variant_lp64
  575. use MKL_VSL_TYPE
  576. !++
  577. ! VSL CONTINUOUS DISTRIBUTION GENERATOR FUNCTION INTERFACES.
  578. !--
  579. ! Uniform distribution
  580. interface
  581. integer function mkl_vsl_vsrnguniform_omp_offload_lp64 (method, stream, n, r, a, b, interop) BIND(C)
  582. use,intrinsic :: iso_c_binding
  583. import :: VSL_STREAM_STATE
  584. integer,intent(in) :: method
  585. type(VSL_STREAM_STATE) :: stream
  586. integer,intent(in) :: n
  587. real(kind=4),intent(out) :: r(n)
  588. real(kind=4),intent(in) :: a
  589. real(kind=4),intent(in) :: b
  590. type(c_ptr),intent(in) :: interop
  591. end function mkl_vsl_vsrnguniform_omp_offload_lp64
  592. end interface
  593. interface
  594. integer function mkl_vsl_vdrnguniform_omp_offload_lp64 (method, stream, n, r, a, b, interop) BIND(C)
  595. use,intrinsic :: iso_c_binding
  596. import :: VSL_STREAM_STATE
  597. integer,intent(in) :: method
  598. type(VSL_STREAM_STATE) :: stream
  599. integer,intent(in) :: n
  600. real(kind=8),intent(out) :: r(n)
  601. real(kind=8),intent(in) :: a
  602. real(kind=8),intent(in) :: b
  603. type(c_ptr),intent(in) :: interop
  604. end function mkl_vsl_vdrnguniform_omp_offload_lp64
  605. end interface
  606. ! Gaussian distribution
  607. interface
  608. integer function mkl_vsl_vsrnggaussian_omp_offload_lp64 (method, stream, n, r, a, sigma, interop) BIND(C)
  609. use,intrinsic :: iso_c_binding
  610. import :: VSL_STREAM_STATE
  611. integer,intent(in) :: method
  612. type(VSL_STREAM_STATE) :: stream
  613. integer,intent(in) :: n
  614. real(kind=4),intent(out) :: r(n)
  615. real(kind=4),intent(in) :: a
  616. real(kind=4),intent(in) :: sigma
  617. type(c_ptr),intent(in) :: interop
  618. end function mkl_vsl_vsrnggaussian_omp_offload_lp64
  619. end interface
  620. interface
  621. integer function mkl_vsl_vdrnggaussian_omp_offload_lp64 (method, stream, n, r, a, sigma, interop) BIND(C)
  622. use,intrinsic :: iso_c_binding
  623. import :: VSL_STREAM_STATE
  624. integer,intent(in) :: method
  625. type(VSL_STREAM_STATE) :: stream
  626. integer,intent(in) :: n
  627. real(kind=8),intent(out) :: r(n)
  628. real(kind=8),intent(in) :: a
  629. real(kind=8),intent(in) :: sigma
  630. type(c_ptr),intent(in) :: interop
  631. end function mkl_vsl_vdrnggaussian_omp_offload_lp64
  632. end interface
  633. ! GaussianMV distribution
  634. interface
  635. integer function mkl_vsl_vsrnggaussianmv_omp_offload_lp64 (method, stream, n, r, dimen, mstorage, a, t, interop) BIND(C)
  636. use,intrinsic :: iso_c_binding
  637. import :: VSL_STREAM_STATE
  638. integer,intent(in) :: method
  639. type(VSL_STREAM_STATE) :: stream
  640. integer,intent(in) :: n
  641. integer, intent(in) :: dimen
  642. real(kind=4),intent(out) :: r(dimen,n)
  643. integer, intent(in) :: mstorage
  644. real(kind=4),intent(in) :: a(dimen)
  645. real(kind=4),intent(in) :: t(dimen,dimen)
  646. type(c_ptr),intent(in) :: interop
  647. end function mkl_vsl_vsrnggaussianmv_omp_offload_lp64
  648. end interface
  649. interface
  650. integer function mkl_vsl_vdrnggaussianmv_omp_offload_lp64 (method, stream, n, r, dimen, mstorage, a, t, interop) BIND(C)
  651. use,intrinsic :: iso_c_binding
  652. import :: VSL_STREAM_STATE
  653. integer,intent(in) :: method
  654. type(VSL_STREAM_STATE) :: stream
  655. integer,intent(in) :: n
  656. integer, intent(in) :: dimen
  657. real(kind=8),intent(out) :: r(dimen,n)
  658. integer, intent(in) :: mstorage
  659. real(kind=8),intent(in) :: a(dimen)
  660. real(kind=8),intent(in) :: t(dimen,dimen)
  661. type(c_ptr),intent(in) :: interop
  662. end function mkl_vsl_vdrnggaussianmv_omp_offload_lp64
  663. end interface
  664. ! Multinomial distribution
  665. interface
  666. integer function mkl_vsl_virngmultinomial_omp_offload_lp64 (method, stream, n, r, ntrial, k, p, interop) BIND(C)
  667. use,intrinsic :: iso_c_binding
  668. import :: VSL_STREAM_STATE
  669. integer,intent(in) :: method
  670. type(VSL_STREAM_STATE) :: stream
  671. integer,intent(in) :: n
  672. integer(kind=4),intent(out) :: r(n)
  673. integer, intent(in) :: ntrial
  674. integer, intent(in) :: k
  675. real(kind=8),intent(in) :: p(k)
  676. type(c_ptr),intent(in) :: interop
  677. end function mkl_vsl_virngmultinomial_omp_offload_lp64
  678. end interface
  679. ! PoissonV distribution
  680. interface
  681. integer function mkl_vsl_virngpoissonv_omp_offload_lp64 (method, stream, n, r, lambda, interop) BIND(C)
  682. use,intrinsic :: iso_c_binding
  683. import :: VSL_STREAM_STATE
  684. integer,intent(in) :: method
  685. type(VSL_STREAM_STATE) :: stream
  686. integer,intent(in) :: n
  687. integer(kind=4),intent(out) :: r(n)
  688. real(kind=8),intent(in) :: lambda(n)
  689. type(c_ptr),intent(in) :: interop
  690. end function mkl_vsl_virngpoissonv_omp_offload_lp64
  691. end interface
  692. ! Exponential distribution
  693. interface
  694. integer function mkl_vsl_vsrngexponential_omp_offload_lp64 (method, stream, n, r, a, beta, interop) BIND(C)
  695. use,intrinsic :: iso_c_binding
  696. import :: VSL_STREAM_STATE
  697. integer,intent(in) :: method
  698. type(VSL_STREAM_STATE) :: stream
  699. integer,intent(in) :: n
  700. real(kind=4),intent(out) :: r(n)
  701. real(kind=4),intent(in) :: a
  702. real(kind=4),intent(in) :: beta
  703. type(c_ptr),intent(in) :: interop
  704. end function mkl_vsl_vsrngexponential_omp_offload_lp64
  705. end interface
  706. interface
  707. integer function mkl_vsl_vdrngexponential_omp_offload_lp64 (method, stream, n, r, a, beta, interop) BIND(C)
  708. use,intrinsic :: iso_c_binding
  709. import :: VSL_STREAM_STATE
  710. integer,intent(in) :: method
  711. type(VSL_STREAM_STATE) :: stream
  712. integer,intent(in) :: n
  713. real(kind=8),intent(out) :: r(n)
  714. real(kind=8),intent(in) :: a
  715. real(kind=8),intent(in) :: beta
  716. type(c_ptr),intent(in) :: interop
  717. end function mkl_vsl_vdrngexponential_omp_offload_lp64
  718. end interface
  719. ! Laplace distribution
  720. interface
  721. integer function mkl_vsl_vsrnglaplace_omp_offload_lp64 (method, stream, n, r, a, beta, interop) BIND(C)
  722. use,intrinsic :: iso_c_binding
  723. import :: VSL_STREAM_STATE
  724. integer,intent(in) :: method
  725. type(VSL_STREAM_STATE) :: stream
  726. integer,intent(in) :: n
  727. real(kind=4),intent(out) :: r(n)
  728. real(kind=4),intent(in) :: a
  729. real(kind=4),intent(in) :: beta
  730. type(c_ptr),intent(in) :: interop
  731. end function mkl_vsl_vsrnglaplace_omp_offload_lp64
  732. end interface
  733. interface
  734. integer function mkl_vsl_vdrnglaplace_omp_offload_lp64 (method, stream, n, r, a, beta, interop) BIND(C)
  735. use,intrinsic :: iso_c_binding
  736. import :: VSL_STREAM_STATE
  737. integer,intent(in) :: method
  738. type(VSL_STREAM_STATE) :: stream
  739. integer,intent(in) :: n
  740. real(kind=8),intent(out) :: r(n)
  741. real(kind=8),intent(in) :: a
  742. real(kind=8),intent(in) :: beta
  743. type(c_ptr),intent(in) :: interop
  744. end function mkl_vsl_vdrnglaplace_omp_offload_lp64
  745. end interface
  746. ! Weibull distribution
  747. interface
  748. integer function mkl_vsl_vsrngweibull_omp_offload_lp64 (method, stream, n, r, alpha, a, beta, interop) BIND(C)
  749. use,intrinsic :: iso_c_binding
  750. import :: VSL_STREAM_STATE
  751. integer,intent(in) :: method
  752. type(VSL_STREAM_STATE) :: stream
  753. integer,intent(in) :: n
  754. real(kind=4),intent(out) :: r(n)
  755. real(kind=4),intent(in) :: alpha
  756. real(kind=4),intent(in) :: a
  757. real(kind=4),intent(in) :: beta
  758. type(c_ptr),intent(in) :: interop
  759. end function mkl_vsl_vsrngweibull_omp_offload_lp64
  760. end interface
  761. interface
  762. integer function mkl_vsl_vdrngweibull_omp_offload_lp64 (method, stream, n, r, alpha, a, beta, interop) BIND(C)
  763. use,intrinsic :: iso_c_binding
  764. import :: VSL_STREAM_STATE
  765. integer,intent(in) :: method
  766. type(VSL_STREAM_STATE) :: stream
  767. integer,intent(in) :: n
  768. real(kind=8),intent(out) :: r(n)
  769. real(kind=8),intent(in) :: alpha
  770. real(kind=8),intent(in) :: a
  771. real(kind=8),intent(in) :: beta
  772. type(c_ptr),intent(in) :: interop
  773. end function mkl_vsl_vdrngweibull_omp_offload_lp64
  774. end interface
  775. ! Cauchy distribution
  776. interface
  777. integer function mkl_vsl_vsrngcauchy_omp_offload_lp64 (method, stream, n, r, a, beta, interop) BIND(C)
  778. use,intrinsic :: iso_c_binding
  779. import :: VSL_STREAM_STATE
  780. integer,intent(in) :: method
  781. type(VSL_STREAM_STATE) :: stream
  782. integer,intent(in) :: n
  783. real(kind=4),intent(out) :: r(n)
  784. real(kind=4),intent(in) :: a
  785. real(kind=4),intent(in) :: beta
  786. type(c_ptr),intent(in) :: interop
  787. end function mkl_vsl_vsrngcauchy_omp_offload_lp64
  788. end interface
  789. interface
  790. integer function mkl_vsl_vdrngcauchy_omp_offload_lp64 (method, stream, n, r, a, beta, interop) BIND(C)
  791. use,intrinsic :: iso_c_binding
  792. import :: VSL_STREAM_STATE
  793. integer,intent(in) :: method
  794. type(VSL_STREAM_STATE) :: stream
  795. integer,intent(in) :: n
  796. real(kind=8),intent(out) :: r(n)
  797. real(kind=8),intent(in) :: a
  798. real(kind=8),intent(in) :: beta
  799. type(c_ptr),intent(in) :: interop
  800. end function mkl_vsl_vdrngcauchy_omp_offload_lp64
  801. end interface
  802. ! Rayleigh distribution
  803. interface
  804. integer function mkl_vsl_vsrngrayleigh_omp_offload_lp64 (method, stream, n, r, a, beta, interop) BIND(C)
  805. use,intrinsic :: iso_c_binding
  806. import :: VSL_STREAM_STATE
  807. integer,intent(in) :: method
  808. type(VSL_STREAM_STATE) :: stream
  809. integer,intent(in) :: n
  810. real(kind=4),intent(out) :: r(n)
  811. real(kind=4),intent(in) :: a
  812. real(kind=4),intent(in) :: beta
  813. type(c_ptr),intent(in) :: interop
  814. end function mkl_vsl_vsrngrayleigh_omp_offload_lp64
  815. end interface
  816. interface
  817. integer function mkl_vsl_vdrngrayleigh_omp_offload_lp64 (method, stream, n, r, a, beta, interop) BIND(C)
  818. use,intrinsic :: iso_c_binding
  819. import :: VSL_STREAM_STATE
  820. integer,intent(in) :: method
  821. type(VSL_STREAM_STATE) :: stream
  822. integer,intent(in) :: n
  823. real(kind=8),intent(out) :: r(n)
  824. real(kind=8),intent(in) :: a
  825. real(kind=8),intent(in) :: beta
  826. type(c_ptr),intent(in) :: interop
  827. end function mkl_vsl_vdrngrayleigh_omp_offload_lp64
  828. end interface
  829. ! Lognormal distribution
  830. interface
  831. integer function mkl_vsl_vsrnglognormal_omp_offload_lp64 (method, stream, n, r, a, sigma, b, beta, interop) BIND(C)
  832. use,intrinsic :: iso_c_binding
  833. import :: VSL_STREAM_STATE
  834. integer,intent(in) :: method
  835. type(VSL_STREAM_STATE) :: stream
  836. integer,intent(in) :: n
  837. real(kind=4),intent(out) :: r(n)
  838. real(kind=4),intent(in) :: a
  839. real(kind=4),intent(in) :: sigma
  840. real(kind=4),intent(in) :: b
  841. real(kind=4),intent(in) :: beta
  842. type(c_ptr),intent(in) :: interop
  843. end function mkl_vsl_vsrnglognormal_omp_offload_lp64
  844. end interface
  845. interface
  846. integer function mkl_vsl_vdrnglognormal_omp_offload_lp64 (method, stream, n, r, a, sigma, b, beta, interop) BIND(C)
  847. use,intrinsic :: iso_c_binding
  848. import :: VSL_STREAM_STATE
  849. integer,intent(in) :: method
  850. type(VSL_STREAM_STATE) :: stream
  851. integer,intent(in) :: n
  852. real(kind=8),intent(out) :: r(n)
  853. real(kind=8),intent(in) :: a
  854. real(kind=8),intent(in) :: sigma
  855. real(kind=8),intent(in) :: b
  856. real(kind=8),intent(in) :: beta
  857. type(c_ptr),intent(in) :: interop
  858. end function mkl_vsl_vdrnglognormal_omp_offload_lp64
  859. end interface
  860. ! Gumbel distribution
  861. interface
  862. integer function mkl_vsl_vsrnggumbel_omp_offload_lp64 (method, stream, n, r, a, beta, interop) BIND(C)
  863. use,intrinsic :: iso_c_binding
  864. import :: VSL_STREAM_STATE
  865. integer,intent(in) :: method
  866. type(VSL_STREAM_STATE) :: stream
  867. integer,intent(in) :: n
  868. real(kind=4),intent(out) :: r(n)
  869. real(kind=4),intent(in) :: a
  870. real(kind=4),intent(in) :: beta
  871. type(c_ptr),intent(in) :: interop
  872. end function mkl_vsl_vsrnggumbel_omp_offload_lp64
  873. end interface
  874. interface
  875. integer function mkl_vsl_vdrnggumbel_omp_offload_lp64 (method, stream, n, r, a, beta, interop) BIND(C)
  876. use,intrinsic :: iso_c_binding
  877. import :: VSL_STREAM_STATE
  878. integer,intent(in) :: method
  879. type(VSL_STREAM_STATE) :: stream
  880. integer,intent(in) :: n
  881. real(kind=8),intent(out) :: r(n)
  882. real(kind=8),intent(in) :: a
  883. real(kind=8),intent(in) :: beta
  884. type(c_ptr),intent(in) :: interop
  885. end function mkl_vsl_vdrnggumbel_omp_offload_lp64
  886. end interface
  887. ! Beta distribution
  888. interface
  889. integer function mkl_vsl_vsrngbeta_omp_offload_lp64 (method, stream, n, r, p, q, a, beta, interop) BIND(C)
  890. use,intrinsic :: iso_c_binding
  891. import :: VSL_STREAM_STATE
  892. integer,intent(in) :: method
  893. type(VSL_STREAM_STATE) :: stream
  894. integer,intent(in) :: n
  895. real(kind=4),intent(out) :: r(n)
  896. real(kind=4),intent(in) :: p
  897. real(kind=4),intent(in) :: q
  898. real(kind=4),intent(in) :: a
  899. real(kind=4),intent(in) :: beta
  900. type(c_ptr),intent(in) :: interop
  901. end function mkl_vsl_vsrngbeta_omp_offload_lp64
  902. end interface
  903. interface
  904. integer function mkl_vsl_vdrngbeta_omp_offload_lp64 (method, stream, n, r, p, q, a, beta, interop) BIND(C)
  905. use,intrinsic :: iso_c_binding
  906. import :: VSL_STREAM_STATE
  907. integer,intent(in) :: method
  908. type(VSL_STREAM_STATE) :: stream
  909. integer,intent(in) :: n
  910. real(kind=8),intent(out) :: r(n)
  911. real(kind=8),intent(in) :: p
  912. real(kind=8),intent(in) :: q
  913. real(kind=8),intent(in) :: a
  914. real(kind=8),intent(in) :: beta
  915. type(c_ptr),intent(in) :: interop
  916. end function mkl_vsl_vdrngbeta_omp_offload_lp64
  917. end interface
  918. ! Gamma distribution
  919. interface
  920. integer function mkl_vsl_vsrnggamma_omp_offload_lp64 (method, stream, n, r, alpha, a, beta, interop) BIND(C)
  921. use,intrinsic :: iso_c_binding
  922. import :: VSL_STREAM_STATE
  923. integer,intent(in) :: method
  924. type(VSL_STREAM_STATE) :: stream
  925. integer,intent(in) :: n
  926. real(kind=4),intent(out) :: r(n)
  927. real(kind=4),intent(in) :: alpha
  928. real(kind=4),intent(in) :: a
  929. real(kind=4),intent(in) :: beta
  930. type(c_ptr),intent(in) :: interop
  931. end function mkl_vsl_vsrnggamma_omp_offload_lp64
  932. end interface
  933. interface
  934. integer function mkl_vsl_vdrnggamma_omp_offload_lp64 (method, stream, n, r, alpha, a, beta, interop) BIND(C)
  935. use,intrinsic :: iso_c_binding
  936. import :: VSL_STREAM_STATE
  937. integer,intent(in) :: method
  938. type(VSL_STREAM_STATE) :: stream
  939. integer,intent(in) :: n
  940. real(kind=8),intent(out) :: r(n)
  941. real(kind=8),intent(in) :: alpha
  942. real(kind=8),intent(in) :: a
  943. real(kind=8),intent(in) :: beta
  944. type(c_ptr),intent(in) :: interop
  945. end function mkl_vsl_vdrnggamma_omp_offload_lp64
  946. end interface
  947. ! ChiSquare distribution
  948. interface
  949. integer function mkl_vsl_vsrngchisquare_omp_offload_lp64 (method, stream, n, r, v, interop) BIND(C)
  950. use,intrinsic :: iso_c_binding
  951. import :: VSL_STREAM_STATE
  952. integer,intent(in) :: method
  953. type(VSL_STREAM_STATE) :: stream
  954. integer,intent(in) :: n
  955. real(kind=4),intent(out) :: r(n)
  956. integer,intent(in) :: v
  957. type(c_ptr),intent(in) :: interop
  958. end function mkl_vsl_vsrngchisquare_omp_offload_lp64
  959. end interface
  960. interface
  961. integer function mkl_vsl_vdrngchisquare_omp_offload_lp64 (method, stream, n, r, v, interop) BIND(C)
  962. use,intrinsic :: iso_c_binding
  963. import :: VSL_STREAM_STATE
  964. integer,intent(in) :: method
  965. type(VSL_STREAM_STATE) :: stream
  966. integer,intent(in) :: n
  967. real(kind=8),intent(out) :: r(n)
  968. integer,intent(in) :: v
  969. type(c_ptr),intent(in) :: interop
  970. end function mkl_vsl_vdrngchisquare_omp_offload_lp64
  971. end interface
  972. !++
  973. ! VSL DISCRETE DISTRIBUTION GENERATOR FUNCTION INTERFACES.
  974. !--
  975. ! Uniform distribution
  976. interface
  977. integer function mkl_vsl_virnguniform_omp_offload_lp64 (method, stream, n, r, a, b, interop) BIND(C)
  978. use,intrinsic :: iso_c_binding
  979. import :: VSL_STREAM_STATE
  980. integer,intent(in) :: method
  981. type(VSL_STREAM_STATE) :: stream
  982. integer,intent(in) :: n
  983. integer(kind=4),intent(out) :: r(n)
  984. integer(kind=4),intent(in) :: a
  985. integer(kind=4),intent(in) :: b
  986. type(c_ptr),intent(in) :: interop
  987. end function mkl_vsl_virnguniform_omp_offload_lp64
  988. end interface
  989. ! UniformBits distribution
  990. interface
  991. integer function mkl_vsl_virnguniformbits_omp_offload_lp64 (method, stream, n, r, interop) BIND(C)
  992. use,intrinsic :: iso_c_binding
  993. import :: VSL_STREAM_STATE
  994. integer,intent(in) :: method
  995. type(VSL_STREAM_STATE) :: stream
  996. integer,intent(in) :: n
  997. integer(kind=4),intent(out) :: r(n)
  998. type(c_ptr),intent(in) :: interop
  999. end function mkl_vsl_virnguniformbits_omp_offload_lp64
  1000. end interface
  1001. ! UniformBits32 distribution
  1002. interface
  1003. integer function mkl_vsl_virnguniformbits32_omp_offload_lp64 (method, stream, n, r, interop) BIND(C)
  1004. use,intrinsic :: iso_c_binding
  1005. import :: VSL_STREAM_STATE
  1006. integer,intent(in) :: method
  1007. type(VSL_STREAM_STATE) :: stream
  1008. integer,intent(in) :: n
  1009. integer(kind=4),intent(out) :: r(n)
  1010. type(c_ptr),intent(in) :: interop
  1011. end function mkl_vsl_virnguniformbits32_omp_offload_lp64
  1012. end interface
  1013. ! UniformBits64 distribution
  1014. interface
  1015. integer function mkl_vsl_virnguniformbits64_omp_offload_lp64 (method, stream, n, r, interop) BIND(C)
  1016. use,intrinsic :: iso_c_binding
  1017. import :: VSL_STREAM_STATE
  1018. integer,intent(in) :: method
  1019. type(VSL_STREAM_STATE) :: stream
  1020. integer,intent(in) :: n
  1021. integer(kind=8),intent(out) :: r(n)
  1022. type(c_ptr),intent(in) :: interop
  1023. end function mkl_vsl_virnguniformbits64_omp_offload_lp64
  1024. end interface
  1025. ! Bernoulli distribution
  1026. interface
  1027. integer function mkl_vsl_virngbernoulli_omp_offload_lp64 (method, stream, n, r, p, interop) BIND(C)
  1028. use,intrinsic :: iso_c_binding
  1029. import :: VSL_STREAM_STATE
  1030. integer,intent(in) :: method
  1031. type(VSL_STREAM_STATE) :: stream
  1032. integer,intent(in) :: n
  1033. integer(kind=4),intent(out) :: r(n)
  1034. real(kind=8),intent(in) :: p
  1035. type(c_ptr),intent(in) :: interop
  1036. end function mkl_vsl_virngbernoulli_omp_offload_lp64
  1037. end interface
  1038. ! Geometric distribution
  1039. interface
  1040. integer function mkl_vsl_virnggeometric_omp_offload_lp64 (method, stream, n, r, p, interop) BIND(C)
  1041. use,intrinsic :: iso_c_binding
  1042. import :: VSL_STREAM_STATE
  1043. integer,intent(in) :: method
  1044. type(VSL_STREAM_STATE) :: stream
  1045. integer,intent(in) :: n
  1046. integer(kind=4),intent(out) :: r(n)
  1047. real(kind=8),intent(in) :: p
  1048. type(c_ptr),intent(in) :: interop
  1049. end function mkl_vsl_virnggeometric_omp_offload_lp64
  1050. end interface
  1051. ! Hypergeometric distribution
  1052. interface
  1053. integer function mkl_vsl_virnghypergeometric_omp_offload_lp64 (method, stream, n, r, l, s, m, interop) BIND(C)
  1054. use,intrinsic :: iso_c_binding
  1055. import :: VSL_STREAM_STATE
  1056. integer,intent(in) :: method
  1057. type(VSL_STREAM_STATE) :: stream
  1058. integer,intent(in) :: n
  1059. integer(kind=4),intent(out) :: r(n)
  1060. integer(kind=4),intent(in) :: l
  1061. integer(kind=4),intent(in) :: s
  1062. integer(kind=4),intent(in) :: m
  1063. type(c_ptr),intent(in) :: interop
  1064. end function mkl_vsl_virnghypergeometric_omp_offload_lp64
  1065. end interface
  1066. ! Binomial distribution
  1067. interface
  1068. integer function mkl_vsl_virngbinomial_omp_offload_lp64 (method, stream, n, r, ntrial, p, interop) BIND(C)
  1069. use,intrinsic :: iso_c_binding
  1070. import :: VSL_STREAM_STATE
  1071. integer,intent(in) :: method
  1072. type(VSL_STREAM_STATE) :: stream
  1073. integer,intent(in) :: n
  1074. integer(kind=4),intent(out) :: r(n)
  1075. integer(kind=4),intent(in) :: ntrial
  1076. real(kind=8),intent(in) :: p
  1077. type(c_ptr),intent(in) :: interop
  1078. end function mkl_vsl_virngbinomial_omp_offload_lp64
  1079. end interface
  1080. ! Negbinomial distribution
  1081. interface
  1082. integer function mkl_vsl_virngnegbinomial_omp_offload_lp64 (method, stream, n, r, a, p, interop) BIND(C)
  1083. use,intrinsic :: iso_c_binding
  1084. import :: VSL_STREAM_STATE
  1085. integer,intent(in) :: method
  1086. type(VSL_STREAM_STATE) :: stream
  1087. integer,intent(in) :: n
  1088. integer(kind=4),intent(out) :: r(n)
  1089. real(kind=8),intent(in) :: a
  1090. real(kind=8),intent(in) :: p
  1091. type(c_ptr),intent(in) :: interop
  1092. end function mkl_vsl_virngnegbinomial_omp_offload_lp64
  1093. end interface
  1094. ! Poisson distribution
  1095. interface
  1096. integer function mkl_vsl_virngpoisson_omp_offload_lp64 (method, stream, n, r, lambda, interop) BIND(C)
  1097. use,intrinsic :: iso_c_binding
  1098. import :: VSL_STREAM_STATE
  1099. integer,intent(in) :: method
  1100. type(VSL_STREAM_STATE) :: stream
  1101. integer,intent(in) :: n
  1102. integer(kind=4),intent(out) :: r(n)
  1103. real(kind=8),intent(in) :: lambda
  1104. type(c_ptr),intent(in) :: interop
  1105. end function mkl_vsl_virngpoisson_omp_offload_lp64
  1106. end interface
  1107. !++
  1108. ! SUMMARY STATISTICS LIBRARY ROUTINES
  1109. !--
  1110. ! Compute routines
  1111. interface
  1112. integer function mkl_vsl_dsscompute_omp_offload_lp64(task, estimates, method, interop) BIND(C)
  1113. use,intrinsic :: iso_c_binding
  1114. import :: VSL_SS_TASK
  1115. type(VSL_SS_TASK) :: task
  1116. integer(kind=8),intent(in) :: estimates
  1117. integer,intent(in) :: method
  1118. end function mkl_vsl_dsscompute_omp_offload_lp64
  1119. end interface
  1120. interface
  1121. integer function mkl_vsl_ssscompute_omp_offload_lp64(task, estimates, method, interop) BIND(C)
  1122. use,intrinsic :: iso_c_binding
  1123. import :: VSL_SS_TASK
  1124. type(VSL_SS_TASK) :: task
  1125. integer(kind=8),intent(in) :: estimates
  1126. integer,intent(in) :: method
  1127. end function mkl_vsl_ssscompute_omp_offload_lp64
  1128. end interface
  1129. end module onemkl_vsl_omp_variant_lp64