clProbDist
An OpenCL library for probability distributions
clProbDist_template.h
Go to the documentation of this file.
1 /*
2  * Authors:
3  *
4  * David Munger <mungerd@iro.umontreal.ca> (2015)
5  * Nabil Kemerchou <kemerchn@iro.umontreal.ca> (2015)
6  * Pierre L'Ecuyer <lecuyer@iro.umontreal.ca> (2015)
7  *
8  */
9 
10 #pragma once
11 #ifndef CLRNG_TEMPLATE_H
12 #define CLRNG_TEMPLATE_H
13 
14 #error This file is a template for specific probability distributions; it should not be included as is. Use a distribution-specific header such as poisson.h instead.
15 
16 #include <clProbDist.h>
17 
18 
75 typedef struct { /* ... */ } clprobdistObject;
76 
85 typedef cl_double vartype;
86 
87 
107 clprobdistObject* clprobdistCreate(DIST_PARAMS, size_t* bufSize, clprobdistStatus* err);
108 
116 clprobdistStatus clprobdistDestroy(clprobdistObject* dist);
117 
145 cl_double clprobdistDensityWithObject(const clprobdistObject* dist, cl_double x, clprobdistStatus* err);
146 
159 cl_double clprobdistProbWithObject(const clprobdistObject* dist, cl_int x, clprobdistStatus* err);
160 
171 cl_double clprobdistCDFWithObject(const clprobdistObject* dist, vartype x, clprobdistStatus* err);
172 
183 cl_double clprobdistComplCDFWithObject(const clprobdistObject* dist, vartype x, clprobdistStatus* err);
184 
197 vartype clprobdistInverseCDFWithObject(const clprobdistObject* dist, cl_double u, clprobdistStatus* err);
198 
207 cl_double clprobdistMeanWithObject(const clprobdistObject* dist, clprobdistStatus* err);
208 
217 cl_double clprobdistVarianceWithObject(const clprobdistObject* dist, clprobdistStatus* err);
218 
227 cl_double clprobdistStdDeviationWithObject(const clprobdistObject* dist, clprobdistStatus* err);
228 
255 clprobdistStatus clprobdistCopyOverFromGlobal(_CLPROBDIST_<DIST>_OBJ_MEM clprobdistObject* destDist, __global const clprobdistObject* srcDist);
256 
283 cl_double clprobdistDensity(DIST_PARAMS, cl_double x, clprobdistStatus* err);
284 
298 cl_double clprobdistProb(DIST_PARAMS, cl_int x, clprobdistStatus* err);
299 
311 cl_double clprobdistCDF(DIST_PARAMS, vartype x, clprobdistStatus* err);
312 
324 cl_double clprobdistComplCDF(DIST_PARAMS, vartype x, clprobdistStatus* err);
325 
337 vartype clprobdistInverseCDF(DIST_PARAMS, cl_double u, clprobdistStatus* err);
338 
349 cl_double clprobdistMean(DIST_PARAMS, clprobdistStatus* err);
350 
361 cl_double clprobdistVariance(DIST_PARAMS, clprobdistStatus* err);
362 
373 cl_double clprobdistStdDeviation(DIST_PARAMS, clprobdistStatus* err);
374 
377 #endif /* CLPROBDIST_H */
378 
379 /*
380 * vim: syntax=c.doxygen spell spelllang=en fdm=syntax fdls=0 expandtab
381 */
cl_double vartype
Random variable data type.
Definition: clProbDist_template.h:85
cl_double clprobdistMeanWithObject(const clprobdistObject *dist, clprobdistStatus *err)
Mean of the distribution [device].
cl_double clprobdistProbWithObject(const clprobdistObject *dist, cl_int x, clprobdistStatus *err)
Probability mass function [device].
cl_double clprobdistCDFWithObject(const clprobdistObject *dist, vartype x, clprobdistStatus *err)
Cumulative density function [device].
cl_double clprobdistVarianceWithObject(const clprobdistObject *dist, clprobdistStatus *err)
Variance of the distribution [device].
cl_double clprobdistComplCDFWithObject(const clprobdistObject *dist, vartype x, clprobdistStatus *err)
Complementary CDF or reliability function [device].
cl_double clprobdistDensity(DIST_PARAMS, cl_double x, clprobdistStatus *err)
Probability density function [device].
Library definitions common to all probability distributions.
vartype clprobdistInverseCDF(DIST_PARAMS, cl_double u, clprobdistStatus *err)
Inverse cumulative density function [device].
vartype clprobdistInverseCDFWithObject(const clprobdistObject *dist, cl_double u, clprobdistStatus *err)
Inverse cumulative density function [device].
clprobdistStatus clprobdistDestroy(clprobdistObject *dist)
Destroy a distribution object.
cl_double clprobdistVariance(DIST_PARAMS, clprobdistStatus *err)
Variance of the distribution [device].
Distribution object [device].
Definition: clProbDist_template.h:75
clprobdistObject * clprobdistCreate(DIST_PARAMS, size_t *bufSize, clprobdistStatus *err)
Create a distribution object.
cl_double clprobdistComplCDF(DIST_PARAMS, vartype x, clprobdistStatus *err)
Complementary CDF or reliability function [device].
cl_double clprobdistCDF(DIST_PARAMS, vartype x, clprobdistStatus *err)
Cumulative density function [device].
cl_double clprobdistDensityWithObject(const clprobdistObject *dist, cl_double x, clprobdistStatus *err)
Probability density function [device].
cl_double clprobdistStdDeviationWithObject(const clprobdistObject *dist, clprobdistStatus *err)
Standard deviation of the distribution [device].
cl_double clprobdistMean(DIST_PARAMS, clprobdistStatus *err)
Mean of the distribution [device].
cl_double clprobdistStdDeviation(DIST_PARAMS, clprobdistStatus *err)
Standard deviation of the distribution [device].
cl_double clprobdistProb(DIST_PARAMS, cl_int x, clprobdistStatus *err)
Probability mass function [device].
clprobdistStatus clprobdistCopyOverFromGlobal(_CLPROBDIST_< DIST >_OBJ_MEM clprobdistObject *destDist, __global const clprobdistObject *srcDist)
Copy a distribution object into already allocated memory [device-only].