|
clQMC
An OpenCL library for quasi-Monte Carlo methods
|
Host interface for lattice rules. More...
Go to the source code of this file.
Typedefs | |
| typedef struct clqmcLatticeRule_ | clqmcLatticeRule |
| Lattice rule object. More... | |
| typedef struct clqmcLatticeRuleStream_ | clqmcLatticeRuleStream |
| Lattice rule stream object. More... | |
Functions | |
| cl_uint | clqmcLatticeRuleNumPoints (const clqmcLatticeRule *lattice) |
| Return the number of point in the point set [device]. More... | |
| cl_uint | clqmcLatticeRuleDimension (const clqmcLatticeRule *lattice) |
| Return the dimension of the point set [device]. More... | |
| clqmcLatticeRule * | clqmcLatticeRuleCreate (cl_uint numPoints, cl_uint dimension, const cl_int *genVec, size_t *objectSize, clqmcStatus *err) |
| Create a new rank-1 lattice rule. More... | |
| clqmcLatticeRule * | clqmcLatticeRuleCreateKorobov (cl_uint numPoints, cl_uint dimension, cl_int gen, size_t *objectSize, clqmcStatus *err) |
| Create a new Korobov lattice rule. More... | |
| clqmcStatus | clqmcLatticeRuleDestroy (clqmcLatticeRule *lattice) |
| Destroy a point set object. More... | |
| clqmcStatus | clqmcLatticeRuleWriteInfo (const clqmcLatticeRule *lattice, FILE *file) |
| Write information about a point set object. More... | |
| CLQMCAPI clqmcLatticeRuleStream * | clqmcLatticeRuleCreateStream (const clqmcLatticeRule *lattice, cl_uint partCount, cl_uint partIndex, const _CLQMC_FPTYPE *shift, clqmcStatus *err) |
| Attach a new stream to a point set object. More... | |
| CLQMCAPI clqmcStatus | clqmcLatticeRuleCreateOverStream (clqmcLatticeRuleStream *stream, const clqmcLatticeRule *lattice, cl_uint partCount, cl_uint partIndex, const _CLQMC_FPTYPE *shift) |
| Attach a new stream to a point set object in already allocated memory [device]. More... | |
| CLQMCAPI clqmcStatus | clqmcLatticeRuleDestroyStream (clqmcLatticeRuleStream *stream) |
| Destroy a stream object. More... | |
| CLQMCAPI _CLQMC_FPTYPE | clqmcLatticeRuleNextCoordinate (clqmcLatticeRuleStream *stream) |
| Return the value of the next coordinate [device]. More... | |
| CLQMCAPI cl_uint | clqmcLatticeRuleNextPoint (clqmcLatticeRuleStream *stream, clqmc_fptype *coords) |
| Retrieve all coordinates of the next point [device]. More... | |
| CLQMCAPI cl_uint | clqmcLatticeRuleForwardToNextPoint (clqmcLatticeRuleStream *stream) |
| Advance a stream to the next point [device]. More... | |
| CLQMCAPI cl_uint | clqmcLatticeRuleCurrentPointIndex (const clqmcLatticeRuleStream *stream) |
| Return the current point index of a stream [device]. More... | |
| CLQMCAPI cl_uint | clqmcLatticeRuleCurrentCoordIndex (const clqmcLatticeRuleStream *stream) |
| Return the current coordinate index of a stream [device]. More... | |
Host interface for lattice rules.
| typedef struct clqmcLatticeRule_ clqmcLatticeRule |
Lattice rule object.
This object stores the properties of a lattice rule (number of points, dimension and generating vector).
| typedef struct clqmcLatticeRuleStream_ clqmcLatticeRuleStream |
Lattice rule stream object.
This stream object can enumerate all or a portion of the points of a lattice rule. When a random shift is applied to a lattice rule, it is attached to the stream object.
| cl_uint clqmcLatticeRuleNumPoints | ( | const clqmcLatticeRule * | lattice | ) |
Return the number of point in the point set [device].
| cl_uint clqmcLatticeRuleDimension | ( | const clqmcLatticeRule * | lattice | ) |
Return the dimension of the point set [device].
| clqmcLatticeRule* clqmcLatticeRuleCreate | ( | cl_uint | numPoints, |
| cl_uint | dimension, | ||
| const cl_int * | genVec, | ||
| size_t * | objectSize, | ||
| clqmcStatus * | err | ||
| ) |
Create a new rank-1 lattice rule.
| [in] | numPoints | Number of points. |
| [in] | dimension | Dimension. |
| [in] | genVec | Generating vector. |
| [out] | objectSize | Size in bytes of the returned object. |
| [out] | err | Error status. |
| clqmcLatticeRule* clqmcLatticeRuleCreateKorobov | ( | cl_uint | numPoints, |
| cl_uint | dimension, | ||
| cl_int | gen, | ||
| size_t * | objectSize, | ||
| clqmcStatus * | err | ||
| ) |
Create a new Korobov lattice rule.
For a Korobov lattice rule, the generating vector \(\boldsymbol a = (1, a, a^2 \bmod n, \dots, a^s \bmod n)\) is parameterized by a single number \(a\).
| [in] | numPoints | Number of points. |
| [in] | dimension | Dimension. |
| [in] | gen | Parameter \(a\) for the generating vector. |
| [out] | objectSize | Size in bytes of the returned object. |
| [out] | err | Error status. |
| clqmcStatus clqmcLatticeRuleDestroy | ( | clqmcLatticeRule * | lattice | ) |
Destroy a point set object.
| clqmcStatus clqmcLatticeRuleWriteInfo | ( | const clqmcLatticeRule * | lattice, |
| FILE * | file | ||
| ) |
Write information about a point set object.
| CLQMCAPI clqmcLatticeRuleStream* clqmcLatticeRuleCreateStream | ( | const clqmcLatticeRule * | lattice, |
| cl_uint | partCount, | ||
| cl_uint | partIndex, | ||
| const _CLQMC_FPTYPE * | shift, | ||
| clqmcStatus * | err | ||
| ) |
Attach a new stream to a point set object.
| CLQMCAPI clqmcStatus clqmcLatticeRuleCreateOverStream | ( | clqmcLatticeRuleStream * | stream, |
| const clqmcLatticeRule * | lattice, | ||
| cl_uint | partCount, | ||
| cl_uint | partIndex, | ||
| const _CLQMC_FPTYPE * | shift | ||
| ) |
Attach a new stream to a point set object in already allocated memory [device].
For a rank-1 lattice rule, the randomization is a periodic random shift. The argument shift must be a vector of the same dimension as the lattice, or NULL.
| CLQMCAPI clqmcStatus clqmcLatticeRuleDestroyStream | ( | clqmcLatticeRuleStream * | stream | ) |
Destroy a stream object.
| CLQMCAPI _CLQMC_FPTYPE clqmcLatticeRuleNextCoordinate | ( | clqmcLatticeRuleStream * | stream | ) |
Return the value of the next coordinate [device].
| CLQMCAPI cl_uint clqmcLatticeRuleNextPoint | ( | clqmcLatticeRuleStream * | stream, |
| clqmc_fptype * | coords | ||
| ) |
Retrieve all coordinates of the next point [device].
| CLQMCAPI cl_uint clqmcLatticeRuleForwardToNextPoint | ( | clqmcLatticeRuleStream * | stream | ) |
Advance a stream to the next point [device].
| CLQMCAPI cl_uint clqmcLatticeRuleCurrentPointIndex | ( | const clqmcLatticeRuleStream * | stream | ) |
Return the current point index of a stream [device].
| CLQMCAPI cl_uint clqmcLatticeRuleCurrentCoordIndex | ( | const clqmcLatticeRuleStream * | stream | ) |
Return the current coordinate index of a stream [device].
1.8.10